Remove cookie banner handling implementation
Categories
(Core :: Privacy: Anti-Tracking, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: emz, Assigned: emz)
References
Details
Attachments
(10 external files)
Remove all cookie banner handling code.
This includes:
- Desktop UI
- Fenix UI
- Focus UI
toolkit/components/cookiebanners/*
| Assignee | ||
Comment 1•2 months ago
|
||
Removes the Cookie Banner Blocker section and subview from the protections
panel, its CSS, its Fluent strings, and the two about:preferences pref
registrations. The preferences.ftl strings and the privacy.mjs registrations
were already orphaned; the prefs UI row was removed in an earlier bug.
Also removes the two protections-popup Glean events that only the deleted
toggle recorded, together with their Legacy Telemetry mirror objects.
Drive-by: browser_privacy_gpc.js had a copy-pasted header comment claiming it
tests the cookie banner UI; it tests Global Privacy Control.
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
Removes the cookieBannerDetected and cookieBannerHandled triggers, the cookie
banner feature callout, the about:privatebrowsing promo and its asset, the
COOKIE_BANNERS promo type, and the three cookiebanners.* entries from the
SET_PREF allow-list.
Notes for reviewers:
- BrowserUtils.PromoType keeps a gap at 5 rather than renumbering, matching the
existing vacancy at 3. The values cross the parent/content boundary, so
renumbering would be a silent behaviour change. - PB_NEWTAB_COOKIE_BANNERS_PROMO was the only type: "default" pb_newtab
message, so about:privatebrowsing now renders without a default promo. That
is intended. - browser_privatebrowsing_about_default_promo.js and _nimbus_dismiss.js were
rewritten rather than deleted, to preserve the only coverage of
handlePromoOnPreload() cross-tab dismissal and the deferred message load path. - shouldShowPromo() still throws on an unrecognised promo type, so a stale
enrolled message naming COOKIE_BANNERS would reject the ShouldShowPromo
query. This hazard pre-exists: the schemas also permit "OTHER", which is
likewise absent from PromoType. Left alone to keep this patch a removal. - test_shouldShowCookieBannersPromo was the only coverage of
showForEnterprise: true, which is now untested.
| Assignee | ||
Comment 3•2 months ago
|
||
Removes the Cookie Banner Blocker preference, its settings-search entry, the
Nimbus cookie-banners feature and its Glean metric, and the stale exposure
record left in BrowserFragment.
The DataStore cleanup migration added in bug 2053618 is kept and now uses the
literal file name, because the android-components class it imported the name
from is removed in Part 5. Dropping it would strand an orphaned preferences
file on every existing install.
Translatable strings are marked moz:removedIn="155" with
tools:ignore="UnusedResources" rather than deleted, per
mobile/android/focus-android/docs/Removing-strings.md; beta-cut.py harvests
them once the marked version stops shipping.
Also removes the cookie-banners entry from the checked-in experimenter
manifest, and the Cookie Banner Blocker assertion in SettingsPrivacyTest,
which would otherwise fail now the row is gone.
| Assignee | ||
Comment 4•2 months ago
|
||
Removes the cookie banner settings screen, the reducer store and its details
panel, the toolbar CFR, the AppState/AppAction/AppReducer plumbing, the SUMO
topic and the Glean metrics and cookie-banner-report-site ping.
Adds a one-time migration deleting the report_site_domains_preferences
DataStore and the five obsolete cookie banner preference keys, mirroring the
equivalent Fenix cleanup. Focus previously had no such cleanup.
Translatable strings are marked moz:removedIn="155" with
tools:ignore="UnusedResources" rather than deleted, per
mobile/android/focus-android/docs/Removing-strings.md.
Reviewer note: removing the cookie_banner_exception ComposeView from
dialog_tracking_protection_sheet.xml re-anchors enhanced_tracking to
security_info. The removed view carried a 28dp top margin, so the gap above
the ETP switch is now the layout's usual 16dp. This inflates cleanly, so
please sanity-check the panel spacing visually.
| Assignee | ||
Comment 5•2 months ago
|
||
Removes the concept-engine cookiehandling package, GeckoCookieBannersStorage,
ReportSiteDomainsRepository, the CookieBannerHandlingMode and
CookieBannerHandlingStatus enums, EngineSession.hasCookieBannerRuleForSession,
the Settings.cookieBannerHandling* settings, CookieBannerAction and
SessionState.cookieBanner.
This is a breaking change for the published components; there is no
replacement API.
FakeEngineSession in Fenix is updated in this commit rather than Part 3
because hasCookieBannerRuleForSession is abstract: removing either the member
or its override alone fails to compile.
| Assignee | ||
Comment 6•2 months ago
|
||
Removes ContentBlocking.CookieBannerMode and CBCookieBannerMode, the
ContentBlocking.Settings cookie banner getters, setters and builder methods,
GeckoSession.ContentDelegate.onCookieBannerDetected and onCookieBannerHandled,
GeckoSession.hasCookieBannerRuleForBrowsingContextTree, and the four
StorageController cookie banner domain methods, along with the JS side that
serviced them.
This is an outright removal with no prior deprecation and no replacement, as
the underlying Gecko feature is being deleted. Embedders using these APIs will
need to drop the calls.
| Assignee | ||
Comment 7•2 months ago
|
||
Removes CLEAR_COOKIE_BANNER_EXCEPTION and CLEAR_COOKIE_BANNER_EXECUTED_RECORD,
their two cleaners, and their use from the Clear-Site-Data header path,
Sanitizer and SiteDataTestUtils.
Bits 26 and 27 are left as permanent holes rather than renumbering the
remaining flags, following the precedent of bug 2006028, which removed
CLEAR_PREDICTOR_NETWORK_DATA and left bit 8 vacant. Renumbering would silently
change the meaning of flag values held by out-of-tree callers. The interface
uuid is likewise not revved, matching that precedent.
All JS consumers land here with the IDL change: in JS, x | undefined
evaluates to x, so a stale reference would silently become a no-op rather
than throwing.
| Assignee | ||
Comment 8•2 months ago
|
||
Deletes toolkit/components/cookiebanners and everything that reached into it:
the static and runtime prefs, the JSWindowActor registration, the
nsILoadInfo.hasInjectedCookieForCookieBannerHandling plumbing and its IPC
serialization, the Glean and Legacy Telemetry registrations, the Nimbus
feature, and the shipped cookie-banner-rules-list Remote Settings dump.
Notes for reviewers:
- Removing the cookiebanners pref group from modules/libpref/moz.build and the
StaticPrefList.yaml block must happen together; a mismatch fails at build
time rather than lint time. - Deleting the local dump does not decommission the main/cookie-banner-rules-list
Remote Settings collection. ESR and older clients still sync it live, so the
server-side collection needs to outlive them and be retired separately. - docs/overview/gecko.md used nsCookieBannerService purely as its worked
example of XPCOM component instantiation; the diagram is kept with a service
that still exists. - Recorded perf pages will now show cookie banners, since hooks_recording.py no
longer sets the dismissal prefs. Worth a follow-up if that shifts baselines.
| Assignee | ||
Comment 9•2 months ago
|
||
ContentPrefService2._execStmts awaited the database connection outside its
try/catch. Callers such as removeByName() do not consume the promise it
returns, so a connection failure surfaced as an unhandled rejection instead of
reaching onError/onDone.
Part 10 calls removeByName() from a synchronous profile data migration, which
opens the database late enough that the connection can be closed before the
removal lands. Without this, every xpcshell test that runs the migrations fails
with "uncaught rejection: Connection is not open."
| Assignee | ||
Comment 10•2 months ago
|
||
Per-site cookie banner exceptions were stored as content prefs under the names
"cookiebanner" and "cookiebannerprivate". The private one was persisted to disk
whenever a domain pref was set with persistInPrivateBrowsing, so both need
clearing. Nothing removes them once the feature is gone, so they would sit in
content-prefs.sqlite indefinitely.
Adds profile data version 179, removing both content pref names across all
domains and clearing any user values left under the cookiebanners. and
browser.promo.cookiebanners. branches, whose defaults no longer exist.
Comment 11•2 months ago
|
||
The following patches are waiting for review from an inactive reviewer:
| ID | Title | Author | Reviewer Status |
|---|---|---|---|
| D314665 | Bug 2058143 - Part 1: Remove the cookie banner handling UI from the protections panel and preferences. r=#anti-tracking!,#fluent-reviewers!,#desktop-theme-reviewers! | emz | manuel: Back Aug 16, 2026 |
| D314672 | Bug 2058143 - Part 7: Remove the cookie banner clear-data integration. r=#anti-tracking! | emz | manuel: Back Aug 16, 2026 |
| D314673 | Bug 2058143 - Part 8: Remove the cookie banner handling implementation. r=#anti-tracking!,#necko-reviewers! | emz | manuel: Back Aug 16, 2026 |
| D314674 | Bug 2058143 - Part 9: Report content pref connection failures through the callback. r=#anti-tracking! | emz | manuel: Back Aug 16, 2026 |
| D314675 | Bug 2058143 - Part 10: Clear cookie banner data from existing profiles. r=#anti-tracking! | emz | manuel: Back Aug 16, 2026 |
:emz, could you please find another reviewer?
For more information, please visit BugBot documentation.
Comment 12•2 months ago
|
||
Comment 13•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/be18d5a0fb03
https://hg.mozilla.org/mozilla-central/rev/683b157a9893
https://hg.mozilla.org/mozilla-central/rev/d95f24e8a083
https://hg.mozilla.org/mozilla-central/rev/fc35b7885d19
https://hg.mozilla.org/mozilla-central/rev/cc97128e262d
https://hg.mozilla.org/mozilla-central/rev/80a5f5790cee
https://hg.mozilla.org/mozilla-central/rev/c3b49c86ffa0
https://hg.mozilla.org/mozilla-central/rev/dfc9e3c70dca
https://hg.mozilla.org/mozilla-central/rev/3104e346936b
https://hg.mozilla.org/mozilla-central/rev/ef1cf3521be3
| Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
Description
•