Closed Bug 1881797 Opened 7 months ago Closed 5 months ago

Add a nsIClearDataService flag for clearing cookies & site data

Categories

(Toolkit :: Data Sanitization, task, P3)

task

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: pbz, Assigned: hsohaney)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

We have multiple components doing user triggered data clearing, e.g. SiteDataManager and Sanitizer.sys.mjs. They all go through nsIClearDataService, but may end up passing different flags. To ensure that we always clear the same things for a data category presented to the user, we should add a flag that clears everything considered "cookies & site data" from a user perspective. This can be a flag similar to CLEAR_FORGET_ABOUT_SITE which combines other flags.

We could add a new flag CLEAR_COOKIES_AND_SITE_DATA which maps to CLEAR_COOKIES | CLEAR_DOM_STORAGES | CLEAR_EME | CLEAR_STORAGE_PERMISSIONS | [...]. Additionally we should add a flag e.g. CLEAR_STORAGE_PERMISSIONS that calls into a dedicated cleaner which clears the permissions with type “storage-access” and “persist-storage”. SiteDataManager clears these permissions when clearing site data, but our new clear recent history dialog (using Sanitizer.sys.mjs) does not.
Once we have a CLEAR_STORAGE_PERMISSIONS we can remove the code that clears these permissions in SiteDataManager.

Assignee: nobody → hsohaney
Attachment #9390863 - Attachment description: WIP: Bug 1881797 - Add cleaner for site-permissions and storage-access for clearing site data history. WIP → Bug 1881797 - (part 1) Add cleaner for site-permissions and storage-access for clearing site data history. r?pbz
Status: NEW → ASSIGNED
Attachment #9391760 - Attachment description: Bug 1881797 - (part 2) Testing for storage permission clearing in the new clear history dialog. r?pbz → Bug 1881797 - (part 3) Testing for storage permission clearing in the new clear history dialog. r?pbz

Seems more like a cleanup task for me. This doesn't have to block the 126 target. Please correct me if you disagree.

Priority: P2 → P3
Pushed by hsohaney@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f7257ad85cc2
(part 1) Add cleaner for site-permissions and storage-access for clearing site data history. r=pbz
https://hg.mozilla.org/integration/autoland/rev/ce52ddb30702
(part 2) Add a helper flag to clear cookies and site data. r=pbz
https://hg.mozilla.org/integration/autoland/rev/85a57f868cef
(part 3) Testing for storage permission clearing in the new clear history dialog. r=pbz,settings-reviewers,mconley
Regressions: 1890595
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Regressions: 1907732
Blocks: 1915608
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: