From def92d1b8e9d373e2f6f27c366d578d97d8960c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:50 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- .../components/cleardata/nsIClearDataService.idl | 28 ++++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'toolkit/components/cleardata/nsIClearDataService.idl') diff --git a/toolkit/components/cleardata/nsIClearDataService.idl b/toolkit/components/cleardata/nsIClearDataService.idl index ea17059bbe..babbc8f05b 100644 --- a/toolkit/components/cleardata/nsIClearDataService.idl +++ b/toolkit/components/cleardata/nsIClearDataService.idl @@ -31,7 +31,7 @@ interface nsIClearDataService : nsISupports * @param aCallback this callback will be executed when the operation is * completed. */ - void deleteDataFromLocalFiles(in bool aIsUserRequest, + void deleteDataFromLocalFiles(in boolean aIsUserRequest, in uint32_t aFlags, in nsIClearDataCallback aCallback); @@ -50,7 +50,7 @@ interface nsIClearDataService : nsISupports * @deprecated Use deleteDataFromBaseDomain instead. */ void deleteDataFromHost(in AUTF8String aHost, - in bool aIsUserRequest, + in boolean aIsUserRequest, in uint32_t aFlags, in nsIClearDataCallback aCallback); @@ -76,7 +76,7 @@ interface nsIClearDataService : nsISupports * may fall back to clearing by principal or host. */ void deleteDataFromBaseDomain(in AUTF8String aDomainOrHost, - in bool aIsUserRequest, + in boolean aIsUserRequest, in uint32_t aFlags, in nsIClearDataCallback aCallback); @@ -93,7 +93,7 @@ interface nsIClearDataService : nsISupports * completed. */ void deleteDataFromPrincipal(in nsIPrincipal aPrincipal, - in bool aIsUserRequest, + in boolean aIsUserRequest, in uint32_t aFlags, in nsIClearDataCallback aCallback); @@ -111,7 +111,7 @@ interface nsIClearDataService : nsISupports * completed. */ void deleteDataInTimeRange(in PRTime aFrom, in PRTime aTo, - in bool aIsUserRequest, + in boolean aIsUserRequest, in uint32_t aFlags, in nsIClearDataCallback aCallback); @@ -307,6 +307,11 @@ interface nsIClearDataService : nsISupports */ const uint32_t CLEAR_BOUNCE_TRACKING_PROTECTION_STATE = 1 << 28; + /** + * Clear permissions of type "persistent-storage" and "storage-access" + */ + const uint32_t CLEAR_STORAGE_PERMISSIONS = 1 << 29; + /** * Use this value to delete all the data. */ @@ -340,6 +345,19 @@ interface nsIClearDataService : nsISupports CLEAR_CREDENTIAL_MANAGER_STATE | CLEAR_COOKIE_BANNER_EXCEPTION | CLEAR_COOKIE_BANNER_EXECUTED_RECORD | CLEAR_FINGERPRINTING_PROTECTION_STATE | CLEAR_BOUNCE_TRACKING_PROTECTION_STATE; + + /** + * Helper flag for clearing cookies and site data. + * This flag groups state that we consider site data + * from the user perspective. If you implement UI that + * offers site data clearing this is almost always what you want. + * If you need more granular control please use more specific + * flags like CLEAR_COOKIES and CLEAR_DOM_STORAGES. + */ + const uint32_t CLEAR_COOKIES_AND_SITE_DATA = + CLEAR_COOKIES | CLEAR_COOKIE_BANNER_EXECUTED_RECORD | CLEAR_DOM_STORAGES | CLEAR_HSTS | + CLEAR_EME | CLEAR_AUTH_TOKENS | CLEAR_AUTH_CACHE | CLEAR_FINGERPRINTING_PROTECTION_STATE | + CLEAR_BOUNCE_TRACKING_PROTECTION_STATE | CLEAR_STORAGE_PERMISSIONS; }; /** -- cgit v1.2.3