Add a per-site preference for cookie banner handling
Categories
(Core :: Privacy: Anti-Tracking, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox107 | --- | fixed |
People
(Reporter: pbz, Assigned: timhuang)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
A per-site preference for cookie banner handling allows users to disable the mechanism for a specific site. We could also support changing the behavior (MODE_REJECT
, MODE_REJECT_OR_ACCEPT
).
We can use the content pref service to store a flag per domain:
https://searchfox.org/mozilla-central/source/dom/interfaces/base/nsIContentPrefService2.idl
The flag can be checked in the rule getters of nsICookieBannerService
. Then consumers don't have to care about these preferences.
Reporter | ||
Comment 1•2 years ago
|
||
Some questions that came up in today's meeting:
nsIContentPrefService
Getter is async, that doesn’t work for the cookie injector
Can we warm up the cache beforehand?
Can we import all exceptions on cookie banner service init?
HashSet of origins? domains?
Cache reads in-memory in cookie banner service
Write changes directly to nsIContentPrefService
Use an observer / listener to subscribe to content pref type “cookiehandling” and keep in-memory cache up to date
Alternative? Key value storage
What should be the key for exceptions?
Domain?
Basedomain?
This should somehow match our rule keying.
Base domain matches the behavior of our existing toggles better
Assignee | ||
Comment 2•2 years ago
|
||
This patch implements the CookieBannerDomainPrefService which manage
the per domain pref setting for cookie banner handling. The service uses
the nsIContentPrefService2 to store the per site pref value.
Assignee | ||
Comment 3•2 years ago
|
||
This patches adds functions to nsCookieBannerService that allow
get, set and remove cookie banner domain preference.
Depends on D157866
Assignee | ||
Comment 4•2 years ago
|
||
The site preference will take precedence over the pref setting when we
getting the cookie rule and the clicking rule. We will use the top-level
uri to check the site preference which aligns with the behavior of ETP
toggle.
Depends on D157867
Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e39d4ec1a0aa Part 1: Implementing CookieBannerDomainPrefService. r=pbz https://hg.mozilla.org/integration/autoland/rev/4a016fb178b8 Part 2: Add functions to nsCookieBannerService to allow setting domain preference. r=pbz https://hg.mozilla.org/integration/autoland/rev/b4c5c6ac0ed6 Part 3: Check the site preference of the top-level domain when getting the cookie rule and clicking rule. r=pbz https://hg.mozilla.org/integration/autoland/rev/5b509c1c080e Part 4: Add tests for cookie banner domain preferences. r=pbz
Comment 7•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e39d4ec1a0aa
https://hg.mozilla.org/mozilla-central/rev/4a016fb178b8
https://hg.mozilla.org/mozilla-central/rev/b4c5c6ac0ed6
https://hg.mozilla.org/mozilla-central/rev/5b509c1c080e
Description
•