Allow to persist cookie banner handling exceptions in private mode
Categories
(Core :: Privacy: Anti-Tracking, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox110 | --- | fixed |
People
(Reporter: amejia, Assigned: timhuang)
References
(Blocks 1 open bug)
Details
(Whiteboard: [geckoview:m111])
Attachments
(2 files)
At the moment the cookie banner exceptions are only session scoped in private mode (No persistent), Focus for Android is always in private mode, and users would expected that exceptions will persist after app restarts similar to tracking protection exceptions.
See more details on the matrix matrix.
Comment 1•3 years ago
|
||
Tim, do you think we could add a flag to the setter method to persist the pref in private browsing for specific callers? Focus could then pass that flag into this method https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/toolkit/components/cookiebanners/nsICookieBannerService.idl#89
We would probably need a separate bucket for PBM exceptions that are persistent?
| Assignee | ||
Comment 2•3 years ago
|
||
I think we can just use the disk version of the setting if the permanent PBM is enabled. Maybe this is easier.
Comment 3•3 years ago
|
||
This might be fine for Focus, but if we use this flag in other cases in the future we may run into issues with PBM overwriting normal browsing prefs.
| Assignee | ||
Comment 4•3 years ago
|
||
Yeah, this is a good concern. But we can use a different content pref key for permanent PBM mode. Then, it won't mess up with normal browsing prefs.
| Assignee | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
Comment 5•3 years ago
|
||
Gabriel, what is the need re: the API? Do you have any requirements, what would be convenient to use to implement this feature? (AC or GV API)
Updated•3 years ago
|
Comment 6•3 years ago
|
||
(In reply to [:owlish] 🦉 PST from comment #5)
Gabriel, what is the need re: the API? Do you have any requirements, what would be convenient to use to implement this feature? (AC or GV API)
Hi , I think it should be something like this method from ac ,with a different name like addPresistentPrivateException.
override suspend fun addException(
uri: String,
privateBrowsing: Boolean,
) {
setGeckoException(uri, DISABLED, privateBrowsing)
}
| Assignee | ||
Comment 7•3 years ago
|
||
One question from me that Arturo might be able to answer. Does Focus rely on the pref browser.privatebrowsing.autostart to enable permanent private mode? If so, do you think we can use the same pref to control the behavior here, or should we introduce a separate pref for this purpose? Thanks.
| Assignee | ||
Comment 8•3 years ago
|
||
I've discovered how Geckoview persists permission for the private mode. There is a separate API to allow Geckoview to persist permission for a private session. Maybe we can also follow the same pattern here.
| Reporter | ||
Comment 9•3 years ago
|
||
(In reply to Tim Huang[:timhuang] from comment #7)
One question from me that Arturo might be able to answer. Does Focus rely on the pref
browser.privatebrowsing.autostartto enable permanent private mode? If so, do you think we can use the same pref to control the behavior here, or should we introduce a separate pref for this purpose? Thanks.
We don't use it in GeckoView, we don't expose it to apps. But if it's convenient for you we can do it, the flag is true and we call
Services.cookieBanners.setDomainPref( uri, mode, true);
right?
| Reporter | ||
Comment 10•3 years ago
•
|
||
(In reply to Tim Huang[:timhuang] from comment #8)
I've discovered how Geckoview persists permission for the private mode. There is a separate API to allow Geckoview to persist permission for a private session. Maybe we can also follow the same pattern here.
Having a separate API will be ideally to be more explicit and have consistency with other APIs, but not sure how much work does that generates for you.
| Assignee | ||
Comment 11•3 years ago
|
||
I am adding a Services.cookieBanners.setDomainPrefAndPersistInPrivateBrowsing() to allow GeckoView to persist settings for private windows.
| Reporter | ||
Comment 12•3 years ago
•
|
||
That sounds fantastic 🙌!
Thanks!
| Assignee | ||
Comment 13•3 years ago
|
||
This patch adds a new function setDomainPrefAndPersistInPrivateBrowsing()
to nsICookieBannerService. This function allows persisting domain pref
in the private browsing mode.
| Assignee | ||
Comment 14•3 years ago
|
||
Depends on D164797
| Reporter | ||
Updated•3 years ago
|
Comment 15•3 years ago
|
||
Comment 16•3 years ago
|
||
Backed out for causing build bustages on nsCookieBannerService.cpp
- Backout link
- Push with failures
- Failure Log
- Failure line: /builds/worker/checkouts/gecko/toolkit/components/cookiebanners/nsCookieBannerService.cpp(640,24): error: function declared 'stdcall' here was previously declared without calling convention
Comment 17•3 years ago
|
||
| Assignee | ||
Updated•3 years ago
|
Comment 18•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ed716ee573f9
https://hg.mozilla.org/mozilla-central/rev/3f2bdf32df53
Description
•