tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit ee1c5b8158bdac2a799d36ac30783bf897ee2fde
parent 6d6b71f2b65384bf812007b9dee9b2a9c899efc2
Author: Emma Zuehlcke <emz@mozilla.com>
Date:   Tue, 30 Sep 2025 15:22:26 +0000

Bug 1971439 - Convert Cookies and Site Data to config-based prefs. r=fluent-reviewers,mstriemer,bolsson

Differential Revision: https://phabricator.services.mozilla.com/D263916

Diffstat:
Mbrowser/components/preferences/main.js | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mbrowser/components/preferences/privacy.inc.xhtml | 59+----------------------------------------------------------
Mbrowser/components/preferences/privacy.js | 540++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Mbrowser/locales/en-US/browser/preferences/preferences.ftl | 20++++++++++++++------
4 files changed, 385 insertions(+), 305 deletions(-)

diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js @@ -992,6 +992,77 @@ let SETTINGS_CONFIG = { }, ], }, + cookiesAndSiteData: { + l10nId: "sitedata-label", + items: [ + { + id: "clearSiteDataButton", + l10nId: "sitedata-clear2", + control: "moz-box-button", + iconSrc: "chrome://browser/skin/flame.svg", + controlAttrs: { + "search-l10n-ids": ` + clear-site-data-cookies-empty.label, + clear-site-data-cache-empty.label + `, + }, + }, + { + id: "deleteOnCloseInfo", + l10nId: "sitedata-delete-on-close-private-browsing3", + control: "moz-message-bar", + }, + { + id: "manageDataSettingsGroup", + control: "moz-box-group", + controlAttrs: { + type: "default", + }, + items: [ + { + id: "siteDataSize", + l10nId: "sitedata-total-size-calculating", + control: "moz-box-item", + supportPage: "sitedata-learn-more", + }, + { + id: "siteDataSettings", + l10nId: "sitedata-settings2", + control: "moz-box-button", + controlAttrs: { + "search-l10n-ids": ` + site-data-settings-window.title, + site-data-column-host.label, + site-data-column-cookies.label, + site-data-column-storage.label, + site-data-settings-description, + site-data-remove-all.label, + `, + }, + }, + { + id: "cookieExceptions", + l10nId: "sitedata-cookies-exceptions2", + control: "moz-box-button", + controlAttrs: { + "search-l10n-ids": ` + permissions-address, + permissions-block.label, + permissions-allow.label, + permissions-remove.label, + permissions-remove-all.label, + permissions-exceptions-cookie-desc + `, + }, + }, + ], + }, + { + id: "deleteOnClose", + l10nId: "sitedata-delete-on-close", + }, + ], + }, }; /** diff --git a/browser/components/preferences/privacy.inc.xhtml b/browser/components/preferences/privacy.inc.xhtml @@ -395,66 +395,9 @@ <html:setting-group groupid="nonTechnicalPrivacy"/> </groupbox> -<!-- Site Data --> <groupbox id="siteDataGroup" data-category="panePrivacy" hidden="true" aria-describedby="totalSiteDataSize"> <label><html:h2 data-l10n-id="sitedata-header"/></label> - - <hbox data-subcategory="sitedata" align="baseline"> - <vbox flex="1"> - <description class="description-with-side-element description-deemphasized" flex="1"> - <html:span id="totalSiteDataSize"></html:span> - <html:a is="moz-support-link" - id="siteDataLearnMoreLink" - data-l10n-id="sitedata-learn-more" - support-page="storage-permissions" - /> - </description> - <hbox flex="1" id="deleteOnCloseNote" class="info-box-container smaller-font-size"> - <hbox class="info-icon-container"> - <html:img class="info-icon"></html:img> - </hbox> - <description flex="1" data-l10n-id="sitedata-delete-on-close-private-browsing2" /> - </hbox> - <hbox id="keepRow" - align="center"> - <checkbox id="deleteOnClose" - data-l10n-id="sitedata-delete-on-close" - flex="1" /> - </hbox> - </vbox> - <vbox align="end"> - <button id="clearSiteDataButton" - is="highlightable-button" - class="accessory-button" - search-l10n-ids="clear-site-data-cookies-empty.label, clear-site-data-cache-empty.label" - data-l10n-id="sitedata-clear"/> - <button id="siteDataSettings" - is="highlightable-button" - class="accessory-button" - data-l10n-id="sitedata-settings" - search-l10n-ids=" - site-data-settings-window.title, - site-data-column-host.label, - site-data-column-cookies.label, - site-data-column-storage.label, - site-data-settings-description, - site-data-remove-all.label, - "/> - <button id="cookieExceptions" - is="highlightable-button" - class="accessory-button" - data-l10n-id="sitedata-cookies-exceptions" - preference="pref.privacy.disable_button.cookie_exceptions" - search-l10n-ids=" - permissions-address, - permissions-block.label, - permissions-allow.label, - permissions-remove.label, - permissions-remove-all.label, - permissions-exceptions-cookie-desc, - " /> - </vbox> - </hbox> + <html:setting-group groupid="cookiesAndSiteData"/> </groupbox> <!-- Cookie Banner Handling --> diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js @@ -1466,6 +1466,304 @@ Preferences.addSetting({ ); }, }); +Preferences.addSetting({ + id: "manageDataSettingsGroup", +}); +Preferences.addSetting({ + id: "siteDataSize", + setup(emitChange) { + let onUsageChanged = async () => { + let [siteDataUsage, cacheUsage] = await Promise.all([ + SiteDataManager.getTotalUsage(), + SiteDataManager.getCacheSize(), + ]); + let totalUsage = siteDataUsage + cacheUsage; + let [value, unit] = DownloadUtils.convertByteUnits(totalUsage); + this.usage = { value, unit }; + + this.isUpdatingSites = false; + emitChange(); + }; + + let onUpdatingSites = () => { + this.isUpdatingSites = true; + emitChange(); + }; + + Services.obs.addObserver(onUsageChanged, "sitedatamanager:sites-updated"); + Services.obs.addObserver(onUpdatingSites, "sitedatamanager:updating-sites"); + + return () => { + Services.obs.removeObserver( + onUsageChanged, + "sitedatamanager:sites-updated" + ); + Services.obs.removeObserver( + onUpdatingSites, + "sitedatamanager:updating-sites" + ); + }; + }, + getControlConfig(config) { + if (this.isUpdatingSites || !this.usage) { + // Data not retrieved yet, show a loading state. + return { + ...config, + l10nId: "sitedata-total-size-calculating", + }; + } + + let { value, unit } = this.usage; + return { + ...config, + l10nId: "sitedata-total-size2", + l10nArgs: { + value, + unit, + }, + }; + }, +}); + +// Register the setting for simpler access in settings that depend on this, but it hasn't been converted yet. +Preferences.addSetting({ + id: "privateBrowsingAutostart", + pref: "browser.privatebrowsing.autostart", +}); + +Preferences.addSetting({ + id: "deleteOnCloseInfo", + deps: ["privateBrowsingAutostart"], + visible({ privateBrowsingAutostart }) { + return privateBrowsingAutostart.value; + }, +}); + +Preferences.addSetting({ + id: "clearSiteDataButton", + setup(emitChange) { + let onSitesUpdated = async () => { + this.isUpdatingSites = false; + emitChange(); + }; + + let onUpdatingSites = () => { + this.isUpdatingSites = true; + emitChange(); + }; + + Services.obs.addObserver(onSitesUpdated, "sitedatamanager:sites-updated"); + Services.obs.addObserver(onUpdatingSites, "sitedatamanager:updating-sites"); + + return () => { + Services.obs.removeObserver( + onSitesUpdated, + "sitedatamanager:sites-updated" + ); + Services.obs.removeObserver( + onUpdatingSites, + "sitedatamanager:updating-sites" + ); + }; + }, + onUserClick() { + let uri; + if (useOldClearHistoryDialog) { + uri = "chrome://browser/content/preferences/dialogs/clearSiteData.xhtml"; + } else { + uri = "chrome://browser/content/sanitize_v2.xhtml"; + } + + gSubDialog.open( + uri, + { + features: "resizable=no", + }, + { + mode: "clearSiteData", + } + ); + }, + disabled() { + return this.isUpdatingSites; + }, +}); +Preferences.addSetting({ + id: "siteDataSettings", + setup(emitChange) { + let onSitesUpdated = async () => { + this.isUpdatingSites = false; + emitChange(); + }; + + let onUpdatingSites = () => { + this.isUpdatingSites = true; + emitChange(); + }; + + Services.obs.addObserver(onSitesUpdated, "sitedatamanager:sites-updated"); + Services.obs.addObserver(onUpdatingSites, "sitedatamanager:updating-sites"); + + return () => { + Services.obs.removeObserver( + onSitesUpdated, + "sitedatamanager:sites-updated" + ); + Services.obs.removeObserver( + onUpdatingSites, + "sitedatamanager:updating-sites" + ); + }; + }, + onUserClick() { + gSubDialog.open( + "chrome://browser/content/preferences/dialogs/siteDataSettings.xhtml" + ); + }, + disabled() { + return this.isUpdatingSites; + }, +}); +Preferences.addSetting({ + id: "cookieExceptions", + onUserClick() { + gSubDialog.open( + "chrome://browser/content/preferences/dialogs/permissions.xhtml", + {}, + { + blockVisible: true, + sessionVisible: true, + allowVisible: true, + prefilledHost: "", + permissionType: "cookie", + } + ); + }, +}); + +function isCookiesAndStorageClearingOnShutdown() { + // We have to branch between the old clear on shutdown prefs and new prefs after the clear history revamp (Bug 1853996) + // Once the old dialog is deprecated, we can remove these branches. + if (useOldClearHistoryDialog) { + return ( + Preferences.get("privacy.sanitize.sanitizeOnShutdown").value && + Preferences.get("privacy.clearOnShutdown.cookies").value && + Preferences.get("privacy.clearOnShutdown.cache").value && + Preferences.get("privacy.clearOnShutdown.offlineApps").value + ); + } + return ( + Preferences.get("privacy.sanitize.sanitizeOnShutdown").value && + Preferences.get("privacy.clearOnShutdown_v2.cookiesAndStorage").value && + Preferences.get("privacy.clearOnShutdown_v2.cache").value + ); +} + +/* + * Unsets cleaning prefs that do not belong to DeleteOnClose + */ +function resetCleaningPrefs() { + let sanitizeOnShutdownPrefsArray = useOldClearHistoryDialog + ? SANITIZE_ON_SHUTDOWN_PREFS_ONLY + : SANITIZE_ON_SHUTDOWN_PREFS_ONLY_V2; + + return sanitizeOnShutdownPrefsArray.forEach( + pref => (Preferences.get(pref).value = false) + ); +} + +Preferences.addSetting({ + id: "clearOnCloseCookies", + pref: useOldClearHistoryDialog + ? "privacy.clearOnShutdown.cookies" + : "privacy.clearOnShutdown_v2.cookiesAndStorage", +}); +Preferences.addSetting({ + id: "clearOnCloseCache", + pref: useOldClearHistoryDialog + ? "privacy.clearOnShutdown.cache" + : "privacy.clearOnShutdown_v2.cache", +}); +Preferences.addSetting({ + id: "clearOnCloseStorage", + pref: useOldClearHistoryDialog + ? "privacy.clearOnShutdown.offlineApps" + : "privacy.clearOnShutdown_v2.cookiesAndStorage", +}); +Preferences.addSetting({ + id: "sanitizeOnShutdown", + pref: "privacy.sanitize.sanitizeOnShutdown", +}); +Preferences.addSetting({ + id: "historyModeCustom", + pref: "privacy.history.custom", +}); +Preferences.addSetting({ + id: "cookieBehavior", + pref: "network.cookie.cookieBehavior", +}); +Preferences.addSetting({ + id: "deleteOnClose", + deps: [ + "clearOnCloseCookies", + "clearOnCloseCache", + "clearOnCloseStorage", + "sanitizeOnShutdown", + "privateBrowsingAutostart", + "historyModeCustom", + "cookieBehavior", + ], + setup() { + // Make sure to do the migration for the clear history dialog before implementing logic for delete on close + // This needs to be done to make sure the migration is done before any pref changes are made to avoid unintentionally + // overwriting prefs + Sanitizer.maybeMigratePrefs("clearOnShutdown"); + }, + disabled({ privateBrowsingAutostart, cookieBehavior }) { + return ( + privateBrowsingAutostart.value || + cookieBehavior.value == Ci.nsICookieService.BEHAVIOR_REJECT + ); + }, + get(_, { privateBrowsingAutostart }) { + return ( + isCookiesAndStorageClearingOnShutdown() || privateBrowsingAutostart.value + ); + }, + set( + value, + { + historyModeCustom, + clearOnCloseCookies, + clearOnCloseCache, + clearOnCloseStorage, + sanitizeOnShutdown, + } + ) { + clearOnCloseCookies.value = value; + clearOnCloseCache.value = value; + clearOnCloseStorage.value = value; + + // Sync the cleaning prefs with the deleteOnClose box. + + // Forget the current pref selection if sanitizeOnShutdown is disabled, + // to not over clear when it gets enabled by the sync mechanism + if (!sanitizeOnShutdown.value) { + resetCleaningPrefs(); + } + // If no other cleaning category is selected, sanitizeOnShutdown gets synced with deleteOnClose + sanitizeOnShutdown.value = + gPrivacyPane._isCustomCleaningPrefPresent() || value; + + // Update the view of the history settings + if (value && !historyModeCustom.value) { + historyModeCustom.value = true; + gPrivacyPane.initializeHistoryMode(); + gPrivacyPane.updateHistoryModePane(); + gPrivacyPane.updatePrivacyMicroControls(); + } + }, +}); function setEventListener(aId, aEventType, aCallback) { document @@ -2069,12 +2367,11 @@ var gPrivacyPane = { } initSettingGroup("httpsOnly"); initSettingGroup("browsingProtection"); + initSettingGroup("cookiesAndSiteData"); this.initNonTechnicalPrivacySection(); this._updateSanitizeSettingsButton(); - this.initDeleteOnCloseBox(); - this.syncSanitizationPrefsWithDeleteOnClose(); this.initializeHistoryMode(); this.updateHistoryModePane(); this.updatePrivacyMicroControls(); @@ -2155,11 +2452,6 @@ var gPrivacyPane = { gPrivacyPane.updateAutostart ); setEventListener( - "cookieExceptions", - "command", - gPrivacyPane.showCookieExceptions - ); - setEventListener( "dohExceptionsButton", "command", gPrivacyPane.showDoHExceptions @@ -2319,16 +2611,6 @@ var gPrivacyPane = { }); this.initSiteDataControls(); - setEventListener( - "clearSiteDataButton", - "command", - gPrivacyPane.clearSiteData - ); - setEventListener( - "siteDataSettings", - "command", - gPrivacyPane.showSiteDataSettings - ); this.initCookieBannerHandling(); @@ -2420,14 +2702,6 @@ var gPrivacyPane = { }, initSiteDataControls() { - Services.obs.addObserver(this, "sitedatamanager:sites-updated"); - Services.obs.addObserver(this, "sitedatamanager:updating-sites"); - let unload = () => { - window.removeEventListener("unload", unload); - Services.obs.removeObserver(this, "sitedatamanager:sites-updated"); - Services.obs.removeObserver(this, "sitedatamanager:updating-sites"); - }; - window.addEventListener("unload", unload); SiteDataManager.updateSites(); }, @@ -2908,8 +3182,6 @@ var gPrivacyPane = { networkCookieBehaviorReadPrefs() { let behavior = Services.cookies.getCookieBehavior(false); let blockCookiesMenu = document.getElementById("blockCookiesMenu"); - let deleteOnCloseCheckbox = document.getElementById("deleteOnClose"); - let deleteOnCloseNote = document.getElementById("deleteOnCloseNote"); let blockCookies = behavior != Ci.nsICookieService.BEHAVIOR_ACCEPT; let cookieBehaviorLocked = Services.prefs.prefIsLocked( "network.cookie.cookieBehavior" @@ -2917,14 +3189,6 @@ var gPrivacyPane = { let blockCookiesControlsDisabled = !blockCookies || cookieBehaviorLocked; blockCookiesMenu.disabled = blockCookiesControlsDisabled; - let completelyBlockCookies = - behavior == Ci.nsICookieService.BEHAVIOR_REJECT; - let privateBrowsing = Preferences.get( - "browser.privatebrowsing.autostart" - ).value; - deleteOnCloseCheckbox.disabled = privateBrowsing || completelyBlockCookies; - deleteOnCloseNote.hidden = !privateBrowsing; - switch (behavior) { case Ci.nsICookieService.BEHAVIOR_ACCEPT: break; @@ -3290,127 +3554,6 @@ var gPrivacyPane = { }, /* - * On loading the page, assigns the state to the deleteOnClose checkbox that fits the pref selection - */ - initDeleteOnCloseBox() { - // Make sure to do the migration for the clear history dialog before implementing logic for delete on close - // This needs to be done to make sure the migration is done before any pref changes are made to avoid unintentionally - // overwriting prefs - Sanitizer.maybeMigratePrefs("clearOnShutdown"); - - let deleteOnCloseBox = document.getElementById("deleteOnClose"); - - // We have to branch between the old clear on shutdown prefs and new prefs after the clear history revamp (Bug 1853996) - // Once the old dialog is deprecated, we can remove these branches. - let isCookiesAndStorageClearingOnShutdown; - if (useOldClearHistoryDialog) { - isCookiesAndStorageClearingOnShutdown = - Preferences.get("privacy.sanitize.sanitizeOnShutdown").value && - Preferences.get("privacy.clearOnShutdown.cookies").value && - Preferences.get("privacy.clearOnShutdown.cache").value && - Preferences.get("privacy.clearOnShutdown.offlineApps").value; - } else { - isCookiesAndStorageClearingOnShutdown = - Preferences.get("privacy.sanitize.sanitizeOnShutdown").value && - Preferences.get("privacy.clearOnShutdown_v2.cookiesAndStorage").value && - Preferences.get("privacy.clearOnShutdown_v2.cache").value; - } - - deleteOnCloseBox.checked = - isCookiesAndStorageClearingOnShutdown || - Preferences.get("browser.privatebrowsing.autostart").value; - }, - - /* - * Keeps the state of the deleteOnClose checkbox in sync with the pref selection - */ - syncSanitizationPrefsWithDeleteOnClose() { - let deleteOnCloseBox = document.getElementById("deleteOnClose"); - let historyMode = Preferences.get("privacy.history.custom"); - let sanitizeOnShutdownPref = Preferences.get( - "privacy.sanitize.sanitizeOnShutdown" - ); - - // ClearOnClose cleaning categories - let cookiePref = useOldClearHistoryDialog - ? Preferences.get("privacy.clearOnShutdown.cookies") - : Preferences.get("privacy.clearOnShutdown_v2.cookiesAndStorage"); - let cachePref = useOldClearHistoryDialog - ? Preferences.get("privacy.clearOnShutdown.cache") - : Preferences.get("privacy.clearOnShutdown_v2.cache"); - let offlineAppsPref = useOldClearHistoryDialog - ? Preferences.get("privacy.clearOnShutdown.offlineApps") - : Preferences.get("privacy.clearOnShutdown_v2.cookiesAndStorage"); - - // Sync the cleaning prefs with the deleteOnClose box - deleteOnCloseBox.addEventListener("command", () => { - let { checked } = deleteOnCloseBox; - cookiePref.value = checked; - cachePref.value = checked; - offlineAppsPref.value = checked; - // Forget the current pref selection if sanitizeOnShutdown is disabled, - // to not over clear when it gets enabled by the sync mechanism - if (!sanitizeOnShutdownPref.value) { - this._resetCleaningPrefs(); - } - // If no other cleaning category is selected, sanitizeOnShutdown gets synced with deleteOnClose - sanitizeOnShutdownPref.value = - this._isCustomCleaningPrefPresent() || checked; - - // Update the view of the history settings - if (checked && !historyMode.value) { - historyMode.value = "custom"; - this.initializeHistoryMode(); - this.updateHistoryModePane(); - this.updatePrivacyMicroControls(); - } - }); - - cookiePref.on("change", this._onSanitizePrefChangeSyncClearOnClose); - cachePref.on("change", this._onSanitizePrefChangeSyncClearOnClose); - offlineAppsPref.on("change", this._onSanitizePrefChangeSyncClearOnClose); - sanitizeOnShutdownPref.on( - "change", - this._onSanitizePrefChangeSyncClearOnClose - ); - }, - - /* - * Sync the deleteOnClose box to its cleaning prefs - */ - _onSanitizePrefChangeSyncClearOnClose() { - let deleteOnCloseBox = document.getElementById("deleteOnClose"); - - // We have to branch between the old clear on shutdown prefs and new prefs after the clear history revamp (Bug 1853996) - // Once the old dialog is deprecated, we can remove these branches. - if (useOldClearHistoryDialog) { - deleteOnCloseBox.checked = - Preferences.get("privacy.sanitize.sanitizeOnShutdown").value && - Preferences.get("privacy.clearOnShutdown.cookies").value && - Preferences.get("privacy.clearOnShutdown.cache").value && - Preferences.get("privacy.clearOnShutdown.offlineApps").value; - } else { - deleteOnCloseBox.checked = - Preferences.get("privacy.sanitize.sanitizeOnShutdown").value && - Preferences.get("privacy.clearOnShutdown_v2.cookiesAndStorage").value && - Preferences.get("privacy.clearOnShutdown_v2.cache").value; - } - }, - - /* - * Unsets cleaning prefs that do not belong to DeleteOnClose - */ - _resetCleaningPrefs() { - let sanitizeOnShutdownPrefsArray = useOldClearHistoryDialog - ? SANITIZE_ON_SHUTDOWN_PREFS_ONLY - : SANITIZE_ON_SHUTDOWN_PREFS_ONLY_V2; - - return sanitizeOnShutdownPrefsArray.forEach( - pref => (Preferences.get(pref).value = false) - ); - }, - - /* Checks if the user set cleaning prefs that do not belong to DeleteOnClose */ _isCustomCleaningPrefPresent() { @@ -3654,24 +3797,6 @@ var gPrivacyPane = { }, /** - * Displays fine-grained, per-site preferences for cookies. - */ - showCookieExceptions() { - var params = { - blockVisible: true, - sessionVisible: true, - allowVisible: true, - prefilledHost: "", - permissionType: "cookie", - }; - gSubDialog.open( - "chrome://browser/content/preferences/dialogs/permissions.xhtml", - undefined, - params - ); - }, - - /** * Displays per-site preferences for HTTPS-Only Mode exceptions. */ showHttpsOnlyModeExceptions() { @@ -3697,61 +3822,6 @@ var gPrivacyPane = { ); }, - showSiteDataSettings() { - gSubDialog.open( - "chrome://browser/content/preferences/dialogs/siteDataSettings.xhtml" - ); - }, - - toggleSiteData(shouldShow) { - let clearButton = document.getElementById("clearSiteDataButton"); - let settingsButton = document.getElementById("siteDataSettings"); - clearButton.disabled = !shouldShow; - settingsButton.disabled = !shouldShow; - }, - - showSiteDataLoading() { - let totalSiteDataSizeLabel = document.getElementById("totalSiteDataSize"); - document.l10n.setAttributes( - totalSiteDataSizeLabel, - "sitedata-total-size-calculating" - ); - }, - - updateTotalDataSizeLabel(siteDataUsage) { - SiteDataManager.getCacheSize().then(function (cacheUsage) { - let totalSiteDataSizeLabel = document.getElementById("totalSiteDataSize"); - let totalUsage = siteDataUsage + cacheUsage; - let [value, unit] = DownloadUtils.convertByteUnits(totalUsage); - document.l10n.setAttributes( - totalSiteDataSizeLabel, - "sitedata-total-size", - { - value, - unit, - } - ); - }); - }, - - clearSiteData() { - // We have to use the full path name to avoid getting errors in - // browser/base/content/test/static/browser_all_files_referenced.js - let dialogFile = useOldClearHistoryDialog - ? "chrome://browser/content/preferences/dialogs/clearSiteData.xhtml" - : "chrome://browser/content/sanitize_v2.xhtml"; - - gSubDialog.open( - dialogFile, - { - features: "resizable=no", - }, - { - mode: "clearSiteData", - } - ); - }, - /** * Initializes the cookie banner handling subgroup on the privacy pane. * @@ -4526,18 +4596,6 @@ var gPrivacyPane = { observe(aSubject, aTopic) { switch (aTopic) { - case "sitedatamanager:updating-sites": - // While updating, we want to disable this section and display loading message until updated - this.toggleSiteData(false); - this.showSiteDataLoading(); - break; - - case "sitedatamanager:sites-updated": - this.toggleSiteData(true); - SiteDataManager.getTotalUsage().then( - this.updateTotalDataSizeLabel.bind(this) - ); - break; case "network:trr-uri-changed": case "network:trr-mode-changed": case "network:trr-confirmation": diff --git a/browser/locales/en-US/browser/preferences/preferences.ftl b/browser/locales/en-US/browser/preferences/preferences.ftl @@ -1177,12 +1177,15 @@ history-clear-button = sitedata-header = Cookies and Site Data +sitedata-label = + .aria-label = { sitedata-header } + sitedata-total-size-calculating = Calculating site data and cache size… # Variables: # $value (number) - Value of the unit (for example: 4.6, 500) # $unit (string) - Name of the unit (for example: "bytes", "KB") -sitedata-total-size = Your stored cookies, site data, and cache are currently using { $value } { $unit } of disk space. +sitedata-total-size2 = Your stored cookies, history, site data, and cache are currently using <strong>{ $value } { $unit }</strong> of disk space. sitedata-learn-more = Learn more @@ -1190,7 +1193,8 @@ sitedata-delete-on-close = .label = Delete cookies and site data when { -brand-short-name } is closed .accesskey = c -sitedata-delete-on-close-private-browsing2 = Based on your history settings, { -brand-short-name } deletes cookies and site data from your session when you close the browser. +sitedata-delete-on-close-private-browsing3 = + .message = Based on your history settings, { -brand-short-name } deletes cookies and site data from your session when you close the browser. sitedata-option-block-cross-site-trackers = .label = Cross-site trackers @@ -1205,17 +1209,21 @@ sitedata-option-block-all-cross-site-cookies = sitedata-option-block-all = .label = All cookies (will cause websites to break) -sitedata-clear = - .label = Clear Data… +sitedata-clear2 = + .label = Clear browsing data .accesskey = l -sitedata-settings = - .label = Manage Data… +sitedata-settings2 = + .label = Manage browsing data .accesskey = M sitedata-cookies-exceptions = .label = Manage Exceptions… + +sitedata-cookies-exceptions2 = + .label = Manage exceptions .accesskey = x + .description = You can specify which websites are always or never allowed to use cookies and site data. ## Privacy Section - Cookie Banner Blocking