Bug 1177085 - Add a preferences panel for changing the pre-loaded TP blocklist. r=jaws,francois
authorPanos Astithas <past@mozilla.com>
Fri, 10 Jul 2015 19:14:29 +0300
changeset 295861 0ea13f8b1e7752f519ddfe54bdc6f11ad1a2b920
parent 295860 ca7e2bde5018579720ab54bb85f739c33eb3417b
child 295862 e085c5011da190d492336b759c07f1e6e2acaab9
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, francois
bugs1177085
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1177085 - Add a preferences panel for changing the pre-loaded TP blocklist. r=jaws,francois
browser/components/preferences/blocklists.js
browser/components/preferences/blocklists.xul
browser/components/preferences/in-content/privacy.js
browser/components/preferences/in-content/privacy.xul
browser/components/preferences/jar.mn
browser/locales/en-US/chrome/browser/preferences/blocklists.dtd
browser/locales/en-US/chrome/browser/preferences/preferences.properties
browser/locales/en-US/chrome/browser/preferences/privacy.dtd
browser/locales/jar.mn
browser/themes/shared/incontentprefs/preferences.inc.css
browser/themes/shared/incontentprefs/search.css
modules/libpref/init/all.js
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/blocklists.js
@@ -0,0 +1,189 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+Components.utils.import("resource://gre/modules/Services.jsm");
+const TEST_LIST = "test-track-simple";
+const TRACK_SUFFIX = "-track-digest256";
+const NAME_SUFFIX = ".name";
+const TRACKING_TABLE_PREF = "urlclassifier.trackingTable";
+
+let gBlocklistManager = {
+  _type: "",
+  _blockLists: [],
+  _brandShortName : null,
+  _bundle: null,
+  _tree: null,
+
+  _view: {
+    _rowCount: 0,
+    get rowCount() {
+      return this._rowCount;
+    },
+    getCellText: function (row, column) {
+      if (column.id == "listCol") {
+        return gBlocklistManager._blockLists[row].name;
+      }
+      return "";
+    },
+
+    isSeparator: function(index) { return false; },
+    isSorted: function() { return false; },
+    isContainer: function(index) { return false; },
+    setTree: function(tree) {},
+    getImageSrc: function(row, column) {},
+    getProgressMode: function(row, column) {},
+    getCellValue: function(row, column) {
+      if (column.id == "selectionCol")
+        return gBlocklistManager._blockLists[row].selected;
+      return undefined;
+    },
+    cycleHeader: function(column) {},
+    getRowProperties: function(row) { return ""; },
+    getColumnProperties: function(column) { return ""; },
+    getCellProperties: function(row, column) {
+      if (column.id == "selectionCol") {
+        return "checkmark";
+      }
+
+      return "";
+    }
+  },
+
+  onWindowKeyPress: function (event) {
+    if (event.keyCode == KeyEvent.DOM_VK_ESCAPE) {
+      window.close();
+    } else if (event.keyCode == KeyEvent.DOM_VK_RETURN) {
+      gBlocklistManager.onApplyChanges();
+    }
+  },
+
+  onLoad: function () {
+    this._bundle = document.getElementById("bundlePreferences");
+    let params = window.arguments[0];
+    this.init(params);
+  },
+
+  init: function (params) {
+    if (this._type) {
+      // reusing an open dialog, clear the old observer
+      this.uninit();
+    }
+
+    this._type = "tracking";
+    this._brandShortName = params.brandShortName;
+
+    let blocklistsText = document.getElementById("blocklistsText");
+    while (blocklistsText.hasChildNodes()) {
+      blocklistsText.removeChild(blocklistsText.firstChild);
+    }
+    blocklistsText.appendChild(document.createTextNode(params.introText));
+
+    document.title = params.windowTitle;
+
+    let treecols = document.getElementsByTagName("treecols")[0];
+    treecols.addEventListener("click", event => {
+      if (event.target.nodeName != "treecol" || event.button != 0) {
+        return;
+      }
+    });
+
+    this._loadBlockLists();
+  },
+
+  uninit: function () {},
+
+  onListSelected: function () {
+    for (let list of this._blockLists) {
+      list.selected = false;
+    }
+    this._blockLists[this._tree.currentIndex].selected = true;
+
+    this._updateTree();
+  },
+
+  onApplyChanges: function () {
+    let activeList = this._getActiveList();
+    let selected = null;
+    for (let list of this._blockLists) {
+      if (list.selected) {
+        selected = list;
+        break;
+      }
+    }
+
+    if (activeList !== selected.id) {
+      const Cc = Components.classes, Ci = Components.interfaces;
+      let msg = this._bundle.getFormattedString("blocklistChangeRequiresRestart",
+                                                [this._brandShortName]);
+      let title = this._bundle.getFormattedString("shouldRestartTitle",
+                                                  [this._brandShortName]);
+      let shouldProceed = Services.prompt.confirm(window, title, msg);
+      if (shouldProceed) {
+        let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
+                           .createInstance(Ci.nsISupportsPRBool);
+        Services.obs.notifyObservers(cancelQuit, "quit-application-requested",
+                                     "restart");
+        shouldProceed = !cancelQuit.data;
+
+        if (shouldProceed) {
+          let trackingTable = TEST_LIST + "," + selected.id + TRACK_SUFFIX;
+          Services.prefs.setCharPref(TRACKING_TABLE_PREF, trackingTable);
+
+          Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit |
+                                Ci.nsIAppStartup.eRestart);
+        }
+      }
+
+      // Don't close the dialog in case we didn't quit.
+      return;
+    }
+    window.close();
+  },
+
+  _loadBlockLists: function () {
+    this._blockLists = [];
+
+    // Get the active block list.
+    let activeList = this._getActiveList();
+
+    // Load blocklists into a table.
+    let branch = Services.prefs.getBranch("browser.safebrowsing.provider.mozilla.lists.");
+    let itemArray = branch.getChildList("");
+    for (let itemName of itemArray) {
+      if (!itemName.endsWith(NAME_SUFFIX)) {
+        continue;
+      }
+      try {
+        let nameKey = branch.getCharPref(itemName);
+        let name = this._bundle.getString(nameKey);
+        let id = itemName.replace(NAME_SUFFIX, "");
+        let selected = activeList === id;
+        this._blockLists.push({ name, id, selected });
+      } catch (e) {
+        // Ignore bogus or missing list name.
+        continue;
+      }
+    }
+
+    this._updateTree();
+  },
+
+  _updateTree: function () {
+    this._tree = document.getElementById("blocklistsTree");
+    this._view._rowCount = this._blockLists.length;
+    this._tree.view = this._view;
+  },
+
+  _getActiveList: function () {
+    let activeList = Services.prefs.getCharPref(TRACKING_TABLE_PREF);
+    activeList = activeList.replace(TEST_LIST, "");
+    activeList = activeList.replace(",", "");
+    activeList = activeList.replace(TRACK_SUFFIX, "");
+    return activeList.trim();
+  }
+};
+
+function initWithParams(params) {
+  gBlocklistManager.init(params);
+}
new file mode 100644
--- /dev/null
+++ b/browser/components/preferences/blocklists.xul
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
+
+<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/blocklists.dtd" >
+
+<window id="BlocklistsDialog" class="windowDialog"
+        windowtype="Browser:Blocklists"
+        title="&window.title;"
+        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        style="width: &window.width;;"
+        onload="gBlocklistManager.onLoad();"
+        onunload="gBlocklistManager.uninit();"
+        persist="screenX screenY width height"
+        onkeypress="gBlocklistManager.onWindowKeyPress(event);">
+
+  <script src="chrome://global/content/treeUtils.js"/>
+  <script src="chrome://browser/content/preferences/blocklists.js"/>
+
+  <stringbundle id="bundlePreferences"
+                src="chrome://browser/locale/preferences/preferences.properties"/>
+
+  <keyset>
+    <key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
+  </keyset>
+
+  <vbox class="contentPane largeDialogContainer" flex="1">
+    <description id="blocklistsText" control="url"/>
+    <separator class="thin"/>
+    <tree id="blocklistsTree" flex="1" style="height: 18em;"
+          hidecolumnpicker="true"
+          onselect="gBlocklistManager.onListSelected();">
+      <treecols>
+        <treecol id="selectionCol" label="" flex="1" sortable="false"
+                 type="checkbox"/>
+        <treecol id="listCol" label="&treehead.list.label;" flex="80"
+                 sortable="false"/>
+      </treecols>
+      <treechildren/>
+    </tree>
+  </vbox>
+  <vbox>
+    <spacer flex="1"/>
+    <hbox class="actionButtons" align="right" flex="1">
+      <button oncommand="close();" icon="close"
+              label="&button.cancel.label;" accesskey="&button.cancel.accesskey;" />
+      <button id="btnApplyChanges" oncommand="gBlocklistManager.onApplyChanges();" icon="save"
+              label="&button.ok.label;" accesskey="&button.ok.accesskey;"/>
+    </hbox>
+  </vbox>
+</window>
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -111,16 +111,18 @@ var gPrivacyPane = {
     setEventListener("privateBrowsingAutoStart", "command",
                      gPrivacyPane.updateAutostart);
     setEventListener("cookieExceptions", "command",
                      gPrivacyPane.showCookieExceptions);
     setEventListener("showCookiesButton", "command",
                      gPrivacyPane.showCookies);
     setEventListener("clearDataSettings", "command",
                      gPrivacyPane.showClearPrivateDataSettings);
+    setEventListener("changeBlockList", "command",
+                     gPrivacyPane.showBlockLists);
   },
 
   // HISTORY MODE
 
   /**
    * The list of preferences which affect the initial history mode settings.
    * If the auto start private browsing mode pref is active, the initial
    * history mode would be set to "Don't remember anything".
@@ -360,16 +362,31 @@ var gPrivacyPane = {
       }
       pref.value = autoStart.hasAttribute('checked');
       mode.selectedIndex = this._lastMode;
       mode.doCommand();
 
       this._shouldPromptForRestart = true;
   },
 
+  /**
+   * Displays the available block lists for tracking protection.
+   */
+  showBlockLists: function ()
+  {
+    var bundlePreferences = document.getElementById("bundlePreferences");
+    let brandName = document.getElementById("bundleBrand")
+                            .getString("brandShortName");
+    var params = { brandShortName: brandName,
+                   windowTitle: bundlePreferences.getString("blockliststitle"),
+                   introText: bundlePreferences.getString("blockliststext") };
+    gSubDialog.open("chrome://browser/content/preferences/blocklists.xul",
+                    null, params);
+  },
+
   // HISTORY
 
   /*
    * Preferences:
    *
    * places.history.enabled
    * - whether history is enabled or not
    * browser.formfill.enable
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -22,16 +22,19 @@
 
   <!-- XXX button prefs -->
   <preference id="pref.privacy.disable_button.cookie_exceptions"
               name="pref.privacy.disable_button.cookie_exceptions"
               type="bool"/>
   <preference id="pref.privacy.disable_button.view_cookies"
               name="pref.privacy.disable_button.view_cookies"
               type="bool"/>
+  <preference id="pref.privacy.disable_button.change_blocklist"
+              name="pref.privacy.disable_button.change_blocklist"
+              type="bool"/>
 
   <!-- Location Bar -->
   <preference id="browser.urlbar.autocomplete.enabled"
               name="browser.urlbar.autocomplete.enabled"
               type="bool"/>
   <preference id="browser.urlbar.suggest.bookmark"
               name="browser.urlbar.suggest.bookmark"
               type="bool"/>
@@ -76,17 +79,17 @@
 <hbox id="header-privacy"
       class="header"
       hidden="true"
       data-category="panePrivacy">
   <label class="header-name">&panePrivacy.title;</label>
 </hbox>
 
 <!-- Tracking -->
-<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true" align="start">
+<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true">
   <caption><label>&tracking.label;</label></caption>
   <vbox>
     <hbox align="center">
       <checkbox id="privacyDoNotTrackCheckbox"
                 label="&dntTrackingNotOkay4.label;"
                 accesskey="&dntTrackingNotOkay4.accesskey;"
                 preference="privacy.donottrackheader.enabled"/>
       <label id="doNotTrackInfo"
@@ -111,16 +114,20 @@
     <hbox align="center">
       <checkbox id="trackingProtectionPBM"
                 preference="privacy.trackingprotection.pbmode.enabled"
                 accesskey="&trackingProtectionPBM5.accesskey;"
                 label="&trackingProtectionPBM5.label;" />
       <label id="trackingProtectionPBMLearnMore"
              class="text-link"
              value="&trackingProtectionPBMLearnMore.label;"/>
+      <spacer flex="1" />
+      <button id="changeBlockList"
+              label="&changeBlockList.label;" accesskey="&changeBlockList.accesskey;"
+              preference="pref.privacy.disable_button.change_blocklist"/>
     </hbox>
   </vbox>
 </groupbox>
 
 <!-- History -->
 <groupbox id="historyGroup" data-category="panePrivacy" hidden="true">
   <caption><label>&history.label;</label></caption>
   <hbox align="center">
--- a/browser/components/preferences/jar.mn
+++ b/browser/components/preferences/jar.mn
@@ -4,16 +4,18 @@
 
 browser.jar:
     content/browser/preferences/aboutPermissions.xul
     content/browser/preferences/aboutPermissions.js
     content/browser/preferences/aboutPermissions.css
     content/browser/preferences/aboutPermissions.xml
     content/browser/preferences/applicationManager.xul
 *   content/browser/preferences/applicationManager.js
+    content/browser/preferences/blocklists.xul
+    content/browser/preferences/blocklists.js
 *   content/browser/preferences/colors.xul
 *   content/browser/preferences/cookies.xul
 *   content/browser/preferences/cookies.js
 *   content/browser/preferences/connection.xul
     content/browser/preferences/connection.js
 *   content/browser/preferences/fonts.xul
     content/browser/preferences/fonts.js
     content/browser/preferences/handlers.xml
new file mode 100644
--- /dev/null
+++ b/browser/locales/en-US/chrome/browser/preferences/blocklists.dtd
@@ -0,0 +1,14 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<!ENTITY window.title                 "Block Lists">
+<!ENTITY window.width                 "50em">
+
+<!ENTITY treehead.list.label          "List">
+<!ENTITY windowClose.key              "w">
+
+<!ENTITY button.cancel.label          "Cancel">
+<!ENTITY button.cancel.accesskey      "C">
+<!ENTITY button.ok.label              "Save Changes">
+<!ENTITY button.ok.accesskey          "S">
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.properties
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.properties
@@ -23,16 +23,28 @@ cookiepermissionstext=You can specify wh
 cookiepermissionstitle=Exceptions - Cookies
 addonspermissionstext=You can specify which websites are allowed to install add-ons. Type the exact address of the site you want to allow and then click Allow.
 addons_permissions_title=Allowed Sites - Add-ons Installation
 popuppermissionstext=You can specify which websites are allowed to open pop-up windows. Type the exact address of the site you want to allow and then click Allow.
 popuppermissionstitle=Allowed Sites - Pop-ups
 invalidURI=Please enter a valid hostname
 invalidURITitle=Invalid Hostname Entered
 
+#### Block List Manager
+
+blockliststext=You can choose which list Firefox will use to block Web elements that may track your browsing activity.
+blockliststitle=Block Lists
+# LOCALIZATION NOTE (mozstdName, etc.): These labels appear in the tracking
+# protection block lists dialog. They are the names of the block lists.
+mozstdName=Disconnect.me basic protection (Recommended). Allows some trackers so websites function properly.
+mozfullName=Disconnect.me strict protection. Blocks known trackers. Some sites may not function properly.
+# LOCALIZATION NOTE (blocklistChangeRequiresRestart, restartTitle): %S = brandShortName
+blocklistChangeRequiresRestart=%S must restart to change block lists.
+shouldRestartTitle=Restart %S
+
 #### Master Password
 
 pw_change2empty_in_fips_mode=You are currently in FIPS mode. FIPS requires a non-empty Master Password.
 pw_change_failed_title=Password Change Failed
 
 #### Fonts
 
 # LOCALIZATION NOTE: Next two strings are for language name representations with
--- a/browser/locales/en-US/chrome/browser/preferences/privacy.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/privacy.dtd
@@ -8,16 +8,18 @@
 <!ENTITY dntTrackingNotOkay4.accesskey "n">
 <!ENTITY doNotTrackInfo.label          "Learn More">
 <!ENTITY trackingProtection5.label     "Use Tracking Protection">
 <!ENTITY trackingProtection5.accesskey "i">
 <!ENTITY trackingProtectionLearnMore.label "Learn more">
 <!ENTITY trackingProtectionPBM5.label         "Use Tracking Protection in Private Windows">
 <!ENTITY trackingProtectionPBM5.accesskey     "v">
 <!ENTITY trackingProtectionPBMLearnMore.label "Learn more">
+<!ENTITY changeBlockList.label          "Change Block List">
+<!ENTITY changeBlockList.accesskey      "C">
 
 <!ENTITY  history.label                 "History">
 
 <!ENTITY  locationBar.label             "Location Bar">
 
 <!ENTITY  locbar.suggest.label          "When using the location bar, suggest:">
 <!ENTITY  locbar.history.label          "History">
 <!ENTITY  locbar.history.accesskey      "H">
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -117,16 +117,17 @@
     locale/browser/feeds/subscribe.properties       (%chrome/browser/feeds/subscribe.properties)
     locale/browser/migration/migration.dtd         (%chrome/browser/migration/migration.dtd)
     locale/browser/migration/migration.properties  (%chrome/browser/migration/migration.properties)
     locale/browser/preferences/aboutPermissions.dtd          (%chrome/browser/preferences/aboutPermissions.dtd)
     locale/browser/preferences/aboutPermissions.properties   (%chrome/browser/preferences/aboutPermissions.properties)
     locale/browser/preferences/advanced.dtd           (%chrome/browser/preferences/advanced.dtd)
     locale/browser/preferences/applicationManager.dtd        (%chrome/browser/preferences/applicationManager.dtd)
     locale/browser/preferences/applicationManager.properties (%chrome/browser/preferences/applicationManager.properties)
+    locale/browser/preferences/blocklists.dtd         (%chrome/browser/preferences/blocklists.dtd)
     locale/browser/preferences/colors.dtd             (%chrome/browser/preferences/colors.dtd)
     locale/browser/preferences/cookies.dtd            (%chrome/browser/preferences/cookies.dtd)
     locale/browser/preferences/content.dtd            (%chrome/browser/preferences/content.dtd)
     locale/browser/preferences/connection.dtd         (%chrome/browser/preferences/connection.dtd)
     locale/browser/preferences/applications.dtd       (%chrome/browser/preferences/applications.dtd)
     locale/browser/preferences/fonts.dtd              (%chrome/browser/preferences/fonts.dtd)
     locale/browser/preferences/main.dtd               (%chrome/browser/preferences/main.dtd)
     locale/browser/preferences/languages.dtd          (%chrome/browser/preferences/languages.dtd)
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -17,16 +17,37 @@
 }
 
 button,
 treecol {
   /* override the * rule */
   -moz-user-select: none;
 }
 
+#engineList treechildren::-moz-tree-image(engineShown, checked),
+#blocklistsTree treechildren::-moz-tree-image(selectionCol, checked) {
+  list-style-image: url("chrome://global/skin/in-content/check.svg#check");
+  width: 21px;
+  height: 21px;
+}
+
+#engineList treechildren::-moz-tree-image(engineShown, checked, selected),
+#blocklistsTree treechildren::-moz-tree-image(selectionCol, checked, selected) {
+  list-style-image: url("chrome://global/skin/in-content/check.svg#check-inverted");
+}
+
+#engineList treechildren::-moz-tree-row,
+#blocklistsTree treechildren::-moz-tree-row {
+  min-height: 36px;
+}
+
+#selectionCol {
+  min-width: 26px;
+}
+
 /* Category List */
 
 #categories {
   max-height: 100vh;
 }
 
 #categories > scrollbox {
   overflow-x: hidden !important;
--- a/browser/themes/shared/incontentprefs/search.css
+++ b/browser/themes/shared/incontentprefs/search.css
@@ -14,37 +14,23 @@
 .searchengine-menuitem > .menu-iconic-left {
   display: -moz-box;
 }
 
 #engineList {
   margin: .5em 0;
 }
 
-#engineList treechildren::-moz-tree-image(engineShown, checked) {
-  list-style-image: url("chrome://global/skin/in-content/check.svg#check");
-  width: 21px;
-  height: 21px;
-}
-
-#engineList treechildren::-moz-tree-image(engineShown, checked, selected) {
-  list-style-image: url("chrome://global/skin/in-content/check.svg#check-inverted");
-}
-
 #engineList treechildren::-moz-tree-image(engineName) {
   -moz-margin-end: 10px;
   -moz-margin-start: 1px;
   width: 16px;
   height: 16px;
 }
 
-#engineList treechildren::-moz-tree-row {
-  min-height: 36px;
-}
-
 #engineList treechildren::-moz-tree-drop-feedback {
   background-color: Highlight;
   width: 10000px; /* 100% doesn't work; 10k is hopefully larger than any window
                      we may have, overflow isn't visible. */
   height: 2px;
   -moz-margin-start: 0;
 }
 
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4762,26 +4762,30 @@ pref("dom.inter-app-communication-api.en
 // Disable mapped array buffer by default.
 pref("dom.mapped_arraybuffer.enabled", false);
 
 // The tables used for Safebrowsing phishing and malware checks.
 pref("urlclassifier.malwareTable", "goog-malware-shavar,goog-unwanted-shavar,test-malware-simple,test-unwanted-simple");
 pref("urlclassifier.phishTable", "goog-phish-shavar,test-phish-simple");
 pref("urlclassifier.downloadBlockTable", "");
 pref("urlclassifier.downloadAllowTable", "");
-pref("urlclassifier.disallow_completions", "test-malware-simple,test-phish-simple,test-unwanted-simple,test-track-simple,test-trackwhite-simple,goog-downloadwhite-digest256,mozstd-track-digest256,mozstd-trackwhite-digest256");
+pref("urlclassifier.disallow_completions", "test-malware-simple,test-phish-simple,test-unwanted-simple,test-track-simple,test-trackwhite-simple,goog-downloadwhite-digest256,mozstd-track-digest256,mozstd-trackwhite-digest256,mozfull-track-digest256");
 
 // The table and update/gethash URLs for Safebrowsing phishing and malware
 // checks.
 pref("urlclassifier.trackingTable", "test-track-simple,mozstd-track-digest256");
 pref("urlclassifier.trackingWhitelistTable", "test-trackwhite-simple,mozstd-trackwhite-digest256");
 
 pref("browser.safebrowsing.provider.mozilla.lists", "mozstd-track-digest256,mozstd-trackwhite-digest256");
 pref("browser.safebrowsing.provider.mozilla.updateURL", "https://shavar.services.mozilla.com/downloads?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2");
 pref("browser.safebrowsing.provider.mozilla.gethashURL", "https://shavar.services.mozilla.com/gethash?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2");
+// Block lists for tracking protection. The name values will be used as the keys
+// to lookup the localized name in preferences.properties.
+pref("browser.safebrowsing.provider.mozilla.lists.mozstd.name", "mozstdName");
+pref("browser.safebrowsing.provider.mozilla.lists.mozfull.name", "mozfullName");
 
 // Turn off Spatial navigation by default.
 pref("snav.enabled", false);
 
 // Original caret implementation on collapsed selection.
 pref("touchcaret.enabled", false);
 
 // This will inflate the size of the touch caret frame when checking if user