Closed Bug 1854940 Opened 1 year ago Closed 1 year ago

Don't run cookie banner handling if the domain was opened within the browsing session

Categories

(Core :: Privacy: Anti-Tracking, task, P2)

task

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: timhuang, Assigned: timhuang)

References

Details

Attachments

(4 files)

The cost of running cookie banner handling could be expensive, and we don't need to run the code if the code has ever been executed for a domain because either the banner was handled or we don't support the domain. So, we can add a cooldown mechanism to stop running cookie banner handling in such cases to save the cost.

However, not running Cookie Banner Handling could risk not handling the banner if the cookie banner state was changed for certain reasons. Therefore, the cooldown mechanism should only stop running the code within the same browsing session.

This needs to reset if site data is cleared or if the user re-enabled cookie banner handling per site.

Assignee: nobody → tihuang
Status: NEW → ASSIGNED
Type: enhancement → task
Severity: -- → N/A
Priority: -- → P2
See Also: → 1857838

To improve the overall performance of cookie banner clicking mechanism. This
patch makes the cookie banner clicking mechanism only executes once per
browsing session.

The patch add a CookieBannerCleaner to ClearDataService. The clearner
clears the cookie banner exception and handledRecord.

Depends on D190763

Depends on D190764

Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8c7ec382574 Part 1: Stop running banner clicking code if the domain has been handled. r=pbz https://hg.mozilla.org/integration/autoland/rev/5a9e45504f32 Part 2: Add a CookieBannerCleaner to ClearDataService. r=pbz,geckoview-reviewers,anti-tracking-reviewers,amejiamarmol https://hg.mozilla.org/integration/autoland/rev/144b76e6db22 Part 3: Add tests. r=pbz https://hg.mozilla.org/integration/autoland/rev/2d264402493e Part 4: Adding a unit test for cleaning cookie banner handling data. r=pbz

Backed out for causing multiple failures.



Flags: needinfo?(tihuang)
Flags: needinfo?(tihuang)
Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e5cfc4f4dc77 Part 1: Stop running banner clicking code if the domain has been handled. r=pbz https://hg.mozilla.org/integration/autoland/rev/9b94b2e2033c Part 2: Add a CookieBannerCleaner to ClearDataService. r=pbz,geckoview-reviewers,anti-tracking-reviewers,amejiamarmol https://hg.mozilla.org/integration/autoland/rev/3d28d021a30b Part 3: Add tests. r=pbz https://hg.mozilla.org/integration/autoland/rev/5392006086fa Part 4: Adding a unit test for cleaning cookie banner handling data. r=pbz
Regressions: 1864164
Regressions: 1864907
Regressions: 1865196
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: