Bug 1501286 - Part 1: Remove support for the tracking protection UI from Preferences r=flod,johannh
☠☠ backed out by 5e471c480b8a ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 25 Oct 2018 13:35:18 +0000
changeset 491331 93d6f4d54f78c2e3898ac8395c1e4f3544537fbd
parent 491330 03a1030b787f33990c48d28e3c628b8127ae8f4b
child 491332 ca6c3139bdd23efd00bc545df3bdf5a272650968
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersflod, johannh
bugs1501286
milestone65.0a1
Bug 1501286 - Part 1: Remove support for the tracking protection UI from Preferences r=flod,johannh Differential Revision: https://phabricator.services.mozilla.com/D9519
browser/components/preferences/in-content/extensionControlled.js
browser/components/preferences/in-content/privacy.js
browser/components/preferences/in-content/privacy.xul
browser/components/preferences/in-content/tests/browser_contentblocking.js
browser/components/preferences/in-content/tests/browser_extension_controlled.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_6.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_site_data.js
browser/components/preferences/in-content/tests/browser_spotlight.js
browser/locales/en-US/browser/preferences/preferences.ftl
browser/themes/shared/incontentprefs/preferences.inc.css
--- a/browser/components/preferences/in-content/extensionControlled.js
+++ b/browser/components/preferences/in-content/extensionControlled.js
@@ -12,19 +12,16 @@ ChromeUtils.defineModuleGetter(this, "Ad
                                   "resource://gre/modules/AddonManager.jsm");
 ChromeUtils.defineModuleGetter(this, "BrowserUtils",
                                   "resource://gre/modules/BrowserUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "DeferredTask",
                                   "resource://gre/modules/DeferredTask.jsm");
 ChromeUtils.defineModuleGetter(this, "ExtensionSettingsStore",
                                   "resource://gre/modules/ExtensionSettingsStore.jsm");
 
-XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingUiEnabled",
-                                      "browser.contentblocking.ui.enabled");
-
 const PREF_SETTING_TYPE = "prefs";
 const PROXY_KEY = "proxy.settings";
 const API_PROXY_PREFS = [
   "network.proxy.type",
   "network.proxy.http",
   "network.proxy.http_port",
   "network.proxy.share_proxy_settings",
   "network.proxy.ftp",
@@ -44,35 +41,29 @@ let extensionControlledContentIds = {
   "privacy.containers": "browserContainersExtensionContent",
   "homepage_override": "browserHomePageExtensionContent",
   "newTabURL": "browserNewTabExtensionContent",
   "webNotificationsDisabled": "browserNotificationsPermissionExtensionContent",
   "defaultSearch": "browserDefaultSearchExtensionContent",
   "proxy.settings": "proxyExtensionContent",
   get "websites.trackingProtectionMode"() {
     return {
-      button: contentBlockingUiEnabled ?
-        "contentBlockingDisableTrackingProtectionExtension" :
-        "trackingProtectionExtensionContentButton",
-      section: contentBlockingUiEnabled ?
-        "contentBlockingTrackingProtectionExtensionContentLabel" :
-        "trackingProtectionExtensionContentLabel",
+      button: "contentBlockingDisableTrackingProtectionExtension",
+      section: "contentBlockingTrackingProtectionExtensionContentLabel",
     };
   },
 };
 
 const extensionControlledL10nKeys = {
   "homepage_override": "homepage-override",
   "newTabURL": "new-tab-url",
   "webNotificationsDisabled": "web-notifications",
   "defaultSearch": "default-search",
   "privacy.containers": "privacy-containers",
-  "websites.trackingProtectionMode": contentBlockingUiEnabled ?
-                                       "websites-content-blocking-all-trackers" :
-                                       "websites-tracking-protection-mode",
+  "websites.trackingProtectionMode": "websites-content-blocking-all-trackers",
   "proxy.settings": "proxy-config",
 };
 
 let extensionControlledIds = {};
 
 /**
   * Check if a pref is being managed by an extension.
   */
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -15,19 +15,16 @@ ChromeUtils.defineModuleGetter(this, "Pl
   "resource://gre/modules/PluralForm.jsm");
 ChromeUtils.defineModuleGetter(this, "LoginHelper",
   "resource://gre/modules/LoginHelper.jsm");
 ChromeUtils.defineModuleGetter(this, "SiteDataManager",
   "resource:///modules/SiteDataManager.jsm");
 
 ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 
-XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingUiEnabled",
-                                      "browser.contentblocking.ui.enabled");
-
 XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingCookiesAndSiteDataRejectTrackersRecommended",
                                       "browser.contentblocking.cookies-site-data.ui.reject-trackers.recommended");
 
 XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingCookiesAndSiteDataRejectTrackersEnabled",
                                       "browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled");
 
 XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingFastBlockUiEnabled",
                                       "browser.contentblocking.fastblock.ui.enabled");
@@ -180,55 +177,33 @@ var gPrivacyPane = {
   _pane: null,
 
   /**
    * Whether the prompt to restart Firefox should appear when changing the autostart pref.
    */
   _shouldPromptForRestart: true,
 
   /**
-   * Initialize the tracking protection prefs and linkify its Learn More link.
-   */
-  _initTrackingProtection() {
-    setEventListener("trackingProtectionRadioGroup", "command",
-      this.trackingProtectionWritePrefs);
-    setEventListener("changeBlockList", "command", this.showBlockLists);
-
-    let link = document.getElementById("trackingProtectionLearnMore");
-    let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "tracking-protection";
-    link.setAttribute("href", url);
-  },
-
-  /**
    * Update the tracking protection UI to deal with extension control.
    */
   _updateTrackingProtectionUI() {
     let isLocked = TRACKING_PROTECTION_PREFS.some(
       pref => Services.prefs.prefIsLocked(pref));
 
     function setInputsDisabledState(isControlled) {
       let disabled = isLocked || isControlled;
-      if (contentBlockingUiEnabled) {
-        let tpCheckbox =
-          document.getElementById("contentBlockingTrackingProtectionCheckbox");
-        // Only enable the TP menu if content blocking and Detect All Trackers
-        // are enabled.
-        document.getElementById("trackingProtectionMenu").disabled = disabled ||
-          !tpCheckbox.checked ||
-          !contentBlockingEnabled;
-        // Only enable the TP category checkbox if content blocking is enabled.
-        tpCheckbox.disabled = disabled || !contentBlockingEnabled;
-      } else {
-        document.querySelectorAll("#trackingProtectionRadioGroup > radio")
-          .forEach((element) => {
-            element.disabled = disabled;
-          });
-        document.querySelector("#trackingProtectionDesc > label")
-          .disabled = disabled;
-      }
+      let tpCheckbox =
+        document.getElementById("contentBlockingTrackingProtectionCheckbox");
+      // Only enable the TP menu if content blocking and Detect All Trackers
+      // are enabled.
+      document.getElementById("trackingProtectionMenu").disabled = disabled ||
+        !tpCheckbox.checked ||
+        !contentBlockingEnabled;
+      // Only enable the TP category checkbox if content blocking is enabled.
+      tpCheckbox.disabled = disabled || !contentBlockingEnabled;
 
       // Notify observers that the TP UI has been updated.
       // This is needed since our tests need to be notified about the
       // trackingProtectionMenu element getting disabled/enabled at the right time.
       Services.obs.notifyObservers(window, "privacy-pane-tp-ui-updated");
     }
 
     if (isLocked) {
@@ -243,19 +218,17 @@ var gPrivacyPane = {
     }
   },
 
   /**
    * Set up handlers for showing and hiding controlling extension info
    * for tracking protection.
    */
   _initTrackingProtectionExtensionControl() {
-    let disableButton = contentBlockingUiEnabled ?
-      "contentBlockingDisableTrackingProtectionExtension" : "disableTrackingProtectionExtension";
-    setEventListener(disableButton, "command",
+    setEventListener("contentBlockingDisableTrackingProtectionExtension", "command",
       makeDisableControllingExtension(
         PREF_SETTING_TYPE, TRACKING_PROTECTION_KEY));
 
     let trackingProtectionObserver = {
       observe(subject, topic, data) {
         gPrivacyPane._updateTrackingProtectionUI();
       },
     };
@@ -287,23 +260,18 @@ var gPrivacyPane = {
     this.initializeHistoryMode();
     this.initAutoplay();
     this.updateAutoplayMediaControlsVisibility();
     this.updateHistoryModePane();
     this.updatePrivacyMicroControls();
     this.initAutoStartPrivateBrowsingReverter();
     this._initAutocomplete();
 
-    /* Initialize Content Blocking / Tracking Protection */
-
-    if (contentBlockingUiEnabled) {
-      this.initContentBlocking();
-    } else {
-      this._initTrackingProtection();
-    }
+    /* Initialize Content Blocking */
+    this.initContentBlocking();
 
     this.trackingProtectionReadPrefs();
     this.networkCookieBehaviorReadPrefs();
     this._initTrackingProtectionExtensionControl();
 
     this.updateContentBlockingVisibility();
 
     Preferences.get("privacy.trackingprotection.enabled").on("change",
@@ -562,48 +530,23 @@ var gPrivacyPane = {
   /**
    * Highlights the Cookies & Site Data UI section.
    */
   changeCookieSettings() {
     gotoPref("privacy-sitedata");
   },
 
   /**
-   * Changes the visibility of elements in the TP/CB section depending on the
-   * content blocking UI pref.
+   * Changes the visibility of elements in the CB section depending on the
+   * content blocking UI prefs.
    */
   updateContentBlockingVisibility() {
-    // First, update the content blocking UI.
-    let visibleState = {
-      "contentBlockingHeader": true,
-      "contentBlockingDescription": true,
-      "contentBlockingLearnMore": true,
-      "contentBlockingRestoreDefaults": true,
-      "contentBlockingCheckboxContainer": true,
-      "contentBlockingCategories": true,
-
-      "trackingProtectionHeader": false,
-      "trackingProtectionDescription": false,
-      "trackingProtectionBox": false,
-    };
-    for (let id in visibleState) {
-      document.getElementById(id).hidden = contentBlockingUiEnabled != visibleState[id];
-    }
-
-    if (contentBlockingUiEnabled) {
-      // Update the Do Not Track section to not mention "Tracking Protection".
-      let dntDefaultRadioItem =
-        document.querySelector("#doNotTrackRadioGroup > radio[value=false]");
-      document.l10n.setAttributes(
-        dntDefaultRadioItem, "do-not-track-option-default-content-blocking");
-
-      // Potentially hide the global toggle.
-      document.getElementById("contentBlockingCheckboxContainer").hidden =
-        !Services.prefs.getBoolPref("browser.contentblocking.global-toggle.enabled", true);
-    }
+    // Potentially hide the global toggle.
+    document.getElementById("contentBlockingCheckboxContainer").hidden =
+      !Services.prefs.getBoolPref("browser.contentblocking.global-toggle.enabled", true);
 
     // Allow turning off the "(recommended)" label using a pref
     let blockCookiesFromTrackers = document.getElementById("blockCookiesFromTrackers");
     if (contentBlockingCookiesAndSiteDataRejectTrackersRecommended) {
       document.l10n.setAttributes(blockCookiesFromTrackers, "sitedata-block-trackers-option-recommended");
     }
 
     // Allow hiding the Reject Trackers option based on a pref
@@ -683,33 +626,25 @@ var gPrivacyPane = {
 
   /**
    * Selects the right item of the Tracking Protection radiogroup.
    */
   trackingProtectionReadPrefs() {
     let enabledPref = Preferences.get("privacy.trackingprotection.enabled");
     let pbmPref = Preferences.get("privacy.trackingprotection.pbmode.enabled");
     let btpmPref = Preferences.get("browser.privacy.trackingprotection.menu");
-    let tpControl,
-        tpCheckbox;
-    if (contentBlockingUiEnabled) {
-      tpControl = document.getElementById("trackingProtectionMenu");
-      tpCheckbox = document.getElementById("contentBlockingTrackingProtectionCheckbox");
-    } else {
-      tpControl = document.getElementById("trackingProtectionRadioGroup");
-    }
+    let tpControl = document.getElementById("trackingProtectionMenu");
+    let tpCheckbox = document.getElementById("contentBlockingTrackingProtectionCheckbox");
 
     let savedMenuValue;
-    if (contentBlockingUiEnabled) {
-      // Only look at the backup pref when restoring the checkbox next to
-      // "All Detected Trackers".
-      if (["always", "private"].includes(btpmPref.value) &&
-          tpCheckbox.checked) {
-        savedMenuValue = btpmPref.value;
-      }
+    // Only look at the backup pref when restoring the checkbox next to
+    // "All Detected Trackers".
+    if (["always", "private"].includes(btpmPref.value) &&
+        tpCheckbox.checked) {
+      savedMenuValue = btpmPref.value;
     }
 
     this._updateTrackingProtectionUI();
 
     // Global enable takes precedence over enabled in Private Browsing.
     if (enabledPref.value) {
       tpControl.value = "always";
       if (tpCheckbox) {
@@ -736,17 +671,17 @@ var gPrivacyPane = {
   networkCookieBehaviorReadPrefs() {
     let behavior = Preferences.get("network.cookie.cookieBehavior").value;
     let blockCookiesCtrl = document.getElementById("blockCookies");
     let blockCookiesLabel = document.getElementById("blockCookiesLabel");
     let blockCookiesMenu = document.getElementById("blockCookiesMenu");
     let keepUntilLabel = document.getElementById("keepUntil");
     let keepUntilMenu = document.getElementById("keepCookiesUntil");
 
-    let disabledByCB = contentBlockingUiEnabled ? !contentBlockingEnabled : false;
+    let disabledByCB = !contentBlockingEnabled;
     let blockCookies = (behavior != 0);
     let cookieBehaviorLocked = Services.prefs.prefIsLocked("network.cookie.cookieBehavior");
     let blockCookiesControlsDisabled = !blockCookies || cookieBehaviorLocked || disabledByCB;
     blockCookiesLabel.disabled = blockCookiesMenu.disabled = blockCookiesControlsDisabled;
 
     let completelyBlockCookies = (behavior == 2);
     let privateBrowsing = Preferences.get("browser.privatebrowsing.autostart").value;
     let cookieExpirationLocked = Services.prefs.prefIsLocked("network.cookie.lifetimePolicy");
@@ -779,24 +714,18 @@ var gPrivacyPane = {
 
   /**
    * Sets the pref values based on the selected item of the radiogroup.
    */
   trackingProtectionWritePrefs() {
     let enabledPref = Preferences.get("privacy.trackingprotection.enabled");
     let pbmPref = Preferences.get("privacy.trackingprotection.pbmode.enabled");
     let btpmPref = Preferences.get("browser.privacy.trackingprotection.menu");
-    let tpControl,
-        tpCheckbox;
-    if (contentBlockingUiEnabled) {
-      tpControl = document.getElementById("trackingProtectionMenu");
-      tpCheckbox = document.getElementById("contentBlockingTrackingProtectionCheckbox");
-    } else {
-      tpControl = document.getElementById("trackingProtectionRadioGroup");
-    }
+    let tpControl = document.getElementById("trackingProtectionMenu");
+    let tpCheckbox = document.getElementById("contentBlockingTrackingProtectionCheckbox");
 
     let value;
     if (tpCheckbox) {
       if (tpCheckbox.checked) {
         value = tpControl.value;
         btpmPref.value = value;
       } else {
         value = "never";
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -14,25 +14,21 @@
       hidden="true"
       data-category="panePrivacy">
   <label class="header-name" flex="1" data-l10n-id="privacy-header"/>
 </hbox>
 
 <!-- Tracking / Content Blocking -->
 <groupbox id="trackingGroup" data-category="panePrivacy" hidden="true" aria-describedby="contentBlockingDescription">
   <caption>
-    <label id="trackingProtectionHeader" hidden="true" data-l10n-id="tracking-header"/>
     <label id="contentBlockingHeader" data-l10n-id="content-blocking-header"/>
   </caption>
   <vbox data-subcategory="trackingprotection">
     <hbox align="start">
       <vbox flex="1">
-        <description id="trackingProtectionDescription" class="description-with-side-element" hidden="true" data-l10n-id="tracking-desc">
-          <html:a id="trackingProtectionLearnMore" data-l10n-name="learn-more" target="_blank" class="learnMore text-link"/>
-        </description>
         <description id="contentBlockingDescription" class="description-with-side-element" data-l10n-id="content-blocking-desc"></description>
         <label id="contentBlockingLearnMore" data-l10n-id="content-blocking-learn-more" class="learnMore text-link"/>
       </vbox>
       <vbox>
         <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
         <hbox>
           <button id="contentBlockingRestoreDefaults"
                   class="accessory-button"
@@ -160,63 +156,23 @@
                        data-l10n-id="content-blocking-reject-trackers-all-third-parties-option"
                        flex="1" />
               </radiogroup>
             </vbox>
           </vbox>
         </hbox>
       </hbox>
     </vbox>
-    <hbox id="trackingProtectionBox" hidden="true">
-      <vbox flex="1">
-        <vbox>
-          <hbox id="trackingProtectionExtensionContentLabel" align="center" hidden="true">
-            <description control="disableTrackingProtectionExtension" flex="1"/>
-          </hbox>
-          <vbox>
-            <description id="trackingProtectionDesc"
-                         control="trackingProtectionRadioGroup">
-              <label data-l10n-id="tracking-mode-label"/>
-            </description>
-            <radiogroup id="trackingProtectionRadioGroup" aria-labelledby="trackingProtectionDesc">
-              <radio value="always"
-                     data-l10n-id="tracking-mode-always"/>
-              <radio value="private"
-                     data-l10n-id="tracking-mode-private"/>
-              <radio value="never"
-                     data-l10n-id="tracking-mode-never"/>
-            </radiogroup>
-          </vbox>
-        </vbox>
-      </vbox>
-      <vbox id="trackingProtectionAdvancedSettings">
-        <hbox id="trackingProtectionExtensionContentButton" hidden="true">
-          <button id="disableTrackingProtectionExtension"
-                  class="extension-controlled-button accessory-button"
-                  flex="1"
-                  data-l10n-id="disable-extension"/>
-        </hbox>
-        <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
-        <hbox>
-          <button id="changeBlockList"
-                  class="accessory-button"
-                  flex="1"
-                  data-l10n-id="tracking-change-block-list"
-                  preference="pref.privacy.disable_button.change_blocklist"
-                  search-l10n-ids="blocklist-window.title, blocklist-desc, blocklist-button-cancel.label, blocklist-button-ok.label"/>
-        </hbox>
-      </vbox>
-    </hbox>
     <vbox id="doNotTrackLearnMoreBox">
       <label><label class="tail-with-learn-more" data-l10n-id="do-not-track-description" id="doNotTrackDesc"></label><label
       class="learnMore text-link" href="https://www.mozilla.org/dnt"
       data-l10n-id="do-not-track-learn-more"></label></label>
       <radiogroup id="doNotTrackRadioGroup" aria-labelledby="doNotTrackDesc" preference="privacy.donottrackheader.enabled">
         <radio value="true" data-l10n-id="do-not-track-option-always"/>
-        <radio value="false" data-l10n-id="do-not-track-option-default"/>
+        <radio value="false" data-l10n-id="do-not-track-option-default-content-blocking"/>
       </radiogroup>
     </vbox>
   </vbox>
 </groupbox>
 
 <!-- Site Data -->
 <groupbox id="siteDataGroup" data-category="panePrivacy" hidden="true" aria-describedby="totalSiteDataSize">
   <caption><label data-l10n-id="sitedata-header"/></caption>
--- a/browser/components/preferences/in-content/tests/browser_contentblocking.js
+++ b/browser/components/preferences/in-content/tests/browser_contentblocking.js
@@ -1,28 +1,26 @@
 /* eslint-env webextensions */
 
 const CB_PREF = "browser.contentblocking.enabled";
-const CB_UI_PREF = "browser.contentblocking.ui.enabled";
 const CB_FB_UI_PREF = "browser.contentblocking.fastblock.ui.enabled";
 const CB_TP_UI_PREF = "browser.contentblocking.trackingprotection.ui.enabled";
 const CB_RT_UI_PREF = "browser.contentblocking.rejecttrackers.ui.enabled";
 const TP_PREF = "privacy.trackingprotection.enabled";
 const TP_PBM_PREF = "privacy.trackingprotection.pbmode.enabled";
 const TP_LIST_PREF = "urlclassifier.trackingTable";
 const FB_PREF = "browser.fastblock.enabled";
 const NCB_PREF = "network.cookie.cookieBehavior";
 const TOGGLE_PREF = "browser.contentblocking.global-toggle.enabled";
 
 requestLongerTimeout(2);
 
 // Checks that the content blocking toggle follows and changes the CB pref.
 add_task(async function testContentBlockingToggle() {
   SpecialPowers.pushPrefEnv({set: [
-    [CB_UI_PREF, true],
     [TOGGLE_PREF, true],
   ]});
 
   await openPreferencesViaOpenPreferencesAPI("privacy", {leaveOpen: true});
   let doc = gBrowser.contentDocument;
 
   let contentBlockingToggle = doc.getElementById("contentBlockingToggle");
   let contentBlockingCheckbox = doc.getElementById("contentBlockingCheckbox");
@@ -55,20 +53,16 @@ add_task(async function testContentBlock
   is(contentBlockingToggle.getAttribute("aria-pressed"), "false", "toggle button has correct aria attribute");
 
   Services.prefs.clearUserPref(CB_PREF);
   gBrowser.removeCurrentTab();
 });
 
 // Tests that the content blocking main category checkboxes have the correct default state.
 add_task(async function testContentBlockingMainCategory() {
-  SpecialPowers.pushPrefEnv({set: [
-    [CB_UI_PREF, true],
-  ]});
-
   let prefs = [
     [CB_PREF, true],
     [FB_PREF, true],
     [TP_PREF, false],
     [TP_PBM_PREF, true],
     [NCB_PREF, Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER],
   ];
 
@@ -156,20 +150,16 @@ add_task(async function testContentBlock
 
   for (let pref of prefs) {
     SpecialPowers.clearUserPref(pref[0]);
   }
 });
 
 // Tests that the content blocking "Restore Defaults" button does what it's supposed to.
 add_task(async function testContentBlockingRestoreDefaults() {
-  SpecialPowers.pushPrefEnv({set: [
-    [CB_UI_PREF, true],
-  ]});
-
   let prefs = {
     CB_PREF: null,
     FB_PREF: null,
     TP_LIST_PREF: null,
     TP_PREF: null,
     TP_PBM_PREF: null,
     NCB_PREF: null,
   };
@@ -222,20 +212,16 @@ add_task(async function testContentBlock
   }
 
   gBrowser.removeCurrentTab();
 });
 
 // Tests that the content blocking "Restore Defaults" button does not restore prefs
 // that are controlled by extensions.
 add_task(async function testContentBlockingRestoreDefaultsSkipExtensionControlled() {
-  SpecialPowers.pushPrefEnv({set: [
-    [CB_UI_PREF, true],
-  ]});
-
   function background() {
     browser.privacy.websites.trackingProtectionMode.set({value: "always"});
   }
 
   // Install an extension that sets Tracking Protection.
   let extension = ExtensionTestUtils.loadExtension({
     useAddonManager: "permanent",
     manifest: {
@@ -385,17 +371,16 @@ async function doDependentControlChecks(
   gBrowser.removeCurrentTab();
 }
 
 // Checks that the granular controls are disabled or enabled depending on the master pref for CB.
 add_task(async function testContentBlockingDependentControls() {
   // In Accept All Cookies mode, the radiogroup under Third-Party Cookies is always disabled
   // since the checkbox next to Third-Party Cookies would be unchecked.
   SpecialPowers.pushPrefEnv({set: [
-    [CB_UI_PREF, true],
     [CB_FB_UI_PREF, true],
     [CB_TP_UI_PREF, true],
     [CB_RT_UI_PREF, true],
     [NCB_PREF, Ci.nsICookieService.BEHAVIOR_ACCEPT],
   ]});
 
   let dependentControls = [
     ".content-blocking-checkbox",
@@ -412,17 +397,16 @@ add_task(async function testContentBlock
     "#blockCookiesMenu",
   ];
 
   await doDependentControlChecks(dependentControls, alwaysDisabledControls);
 
   // In Block Cookies from Trackers (or Block Cookies from All Third-Parties) mode, the
   // radiogroup's disabled status must obey the content blocking enabled state.
   SpecialPowers.pushPrefEnv({set: [
-    [CB_UI_PREF, true],
     [CB_FB_UI_PREF, true],
     [CB_TP_UI_PREF, true],
     [CB_RT_UI_PREF, true],
     [NCB_PREF, Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER],
   ]});
 
   dependentControls = [
     ".content-blocking-checkbox",
@@ -438,17 +422,16 @@ add_task(async function testContentBlock
   ];
 
   await doDependentControlChecks(dependentControls);
 });
 
 // Checks that the controls for tracking protection are disabled when all TP prefs are off.
 add_task(async function testContentBlockingDependentTPControls() {
   SpecialPowers.pushPrefEnv({set: [
-    [CB_UI_PREF, true],
     [CB_FB_UI_PREF, true],
     [CB_TP_UI_PREF, true],
     [CB_RT_UI_PREF, true],
     [TP_PREF, false],
     [TP_PBM_PREF, false],
     [NCB_PREF, Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER],
   ]});
 
@@ -476,17 +459,16 @@ add_task(async function testContentBlock
 // when the Cookies and Site Data section is set to block either "All Cookies" or "Cookies from
 // unvisited websites".
 add_task(async function testContentBlockingDependentControlsOnSiteDataUI() {
   let prefValuesToTest = [
     Ci.nsICookieService.BEHAVIOR_REJECT,        // Block All Cookies
   ];
   for (let value of prefValuesToTest) {
     await SpecialPowers.pushPrefEnv({set: [
-      [CB_UI_PREF, true],
       [CB_FB_UI_PREF, true],
       [CB_TP_UI_PREF, true],
       [CB_RT_UI_PREF, true],
       [TP_PREF, false],
       [TP_PBM_PREF, true],
       [NCB_PREF, value],
     ]});
 
@@ -520,17 +502,16 @@ add_task(async function testContentBlock
 
   // When Block Cookies from unvisited websites is selected, the Third-Party Cookies section under
   // Content Blocking should get disabled unconditionally.
   prefValuesToTest = [
     Ci.nsICookieService.BEHAVIOR_LIMIT_FOREIGN, // Block Cookies from unvisited websites
   ];
   for (let value of prefValuesToTest) {
     await SpecialPowers.pushPrefEnv({set: [
-      [CB_UI_PREF, true],
       [CB_FB_UI_PREF, true],
       [CB_TP_UI_PREF, true],
       [CB_RT_UI_PREF, true],
       [TP_PREF, false],
       [TP_PBM_PREF, true],
       [NCB_PREF, value],
     ]});
 
@@ -562,17 +543,16 @@ add_task(async function testContentBlock
   // When Accept All Cookies is selected, the radio buttons under Third-Party Cookies
   // in Content Blocking as well as the Type blocked controls in Cookies and Site Data
   // must remain disabled unconditionally.
   prefValuesToTest = [
     Ci.nsICookieService.BEHAVIOR_ACCEPT,         // Accept All Cookies
   ];
   for (let value of prefValuesToTest) {
     await SpecialPowers.pushPrefEnv({set: [
-      [CB_UI_PREF, true],
       [CB_FB_UI_PREF, true],
       [CB_TP_UI_PREF, true],
       [CB_RT_UI_PREF, true],
       [TP_PREF, false],
       [TP_PBM_PREF, true],
       [NCB_PREF, value],
     ]});
 
@@ -599,17 +579,16 @@ add_task(async function testContentBlock
   // For other choices of cookie policies, no parts of the UI should get disabled
   // unconditionally.
   prefValuesToTest = [
     Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN, // Block All Third-Party Cookies
     Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER, // Block Cookies from third-party trackers
   ];
   for (let value of prefValuesToTest) {
     await SpecialPowers.pushPrefEnv({set: [
-      [CB_UI_PREF, true],
       [CB_FB_UI_PREF, true],
       [CB_TP_UI_PREF, true],
       [CB_RT_UI_PREF, true],
       [TP_PREF, false],
       [TP_PBM_PREF, true],
       [NCB_PREF, value],
     ]});
 
@@ -633,17 +612,16 @@ add_task(async function testContentBlock
 });
 
 
 // Checks that the warnings in the Content Blocking Third-Party Cookies section correctly appear based on
 // the selections in the Cookies and Site Data section.
 add_task(async function testContentBlockingThirdPartyCookiesWarning() {
   await SpecialPowers.pushPrefEnv({set: [
     [CB_PREF, true],
-    [CB_UI_PREF, true],
     [CB_FB_UI_PREF, true],
     [CB_TP_UI_PREF, true],
     [CB_RT_UI_PREF, true],
   ]});
 
   let expectedDeckIndex = new Map([
     [Ci.nsICookieService.BEHAVIOR_ACCEPT, 0],
     [Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN, 0],
--- a/browser/components/preferences/in-content/tests/browser_extension_controlled.js
+++ b/browser/components/preferences/in-content/tests/browser_extension_controlled.js
@@ -583,79 +583,58 @@ add_task(async function testExtensionCon
   // Don't finalize the current store since it will write out the bad data.
   await ExtensionSettingsStore._reloadFile(false);
 
   is(ExtensionSettingsStore.getSetting("prefs", "homepage_override"), null,
      "The ExtensionSettingsStore is left empty.");
 });
 
 add_task(async function testExtensionControlledTrackingProtection() {
-  const CB_UI_PREF = "browser.contentblocking.ui.enabled";
   const TP_PREF = "privacy.trackingprotection.enabled";
   const TP_DEFAULT = false;
   const EXTENSION_ID = "@set_tp";
-  const CONTROLLED_LABEL_ID = {
-    old: "trackingProtectionExtensionContentLabel",
-    new: "contentBlockingTrackingProtectionExtensionContentLabel",
-  };
-  const CONTROLLED_BUTTON_ID = {
-    old: "trackingProtectionExtensionContentButton",
-    new: "contentBlockingDisableTrackingProtectionExtension",
-  };
-  const DISABLE_BUTTON_ID = {
-    old: "disableTrackingProtectionExtension",
-    new: "contentBlockingDisableTrackingProtectionExtension",
-  };
+  const CONTROLLED_LABEL_ID = "contentBlockingTrackingProtectionExtensionContentLabel";
+  const CONTROLLED_BUTTON_ID = "contentBlockingDisableTrackingProtectionExtension";
+  const DISABLE_BUTTON_ID = "contentBlockingDisableTrackingProtectionExtension";
 
   let tpEnabledPref = () => Services.prefs.getBoolPref(TP_PREF);
-  let cbUIEnabledPref = () => Services.prefs.getBoolPref(CB_UI_PREF);
 
   await SpecialPowers.pushPrefEnv(
-    {"set": [[TP_PREF, TP_DEFAULT], [CB_UI_PREF, true]]});
+    {"set": [[TP_PREF, TP_DEFAULT]]});
 
   function background() {
     browser.privacy.websites.trackingProtectionMode.set({value: "always"});
   }
 
   function verifyState(isControlled) {
     is(tpEnabledPref(), isControlled, "TP pref is set to the expected value.");
 
-    let controlledLabel = doc.getElementById(CONTROLLED_LABEL_ID[uiType]);
-    let controlledButton = doc.getElementById(CONTROLLED_BUTTON_ID[uiType]);
+    let controlledLabel = doc.getElementById(CONTROLLED_LABEL_ID);
+    let controlledButton = doc.getElementById(CONTROLLED_BUTTON_ID);
 
     is(controlledLabel.hidden, !isControlled, "The extension controlled row's visibility is as expected.");
     is(controlledButton.hidden, !isControlled, "The disable extension button's visibility is as expected.");
     if (isControlled) {
       let controlledDesc = controlledLabel.querySelector("description");
       Assert.deepEqual(doc.l10n.getAttributes(controlledDesc), {
-        id: cbUIEnabledPref() ? "extension-controlled-websites-content-blocking-all-trackers" :
-                                "extension-controlled-websites-tracking-protection-mode",
+        id: "extension-controlled-websites-content-blocking-all-trackers",
         args: {
           name: "set_tp",
         },
       }, "The user is notified that an extension is controlling TP.");
     }
 
-    if (uiType === "old") {
-      for (let element of doc.querySelectorAll("#trackingProtectionRadioGroup > radio")) {
-        is(element.disabled, isControlled, "TP controls are enabled.");
-      }
-      is(doc.querySelector("#trackingProtectionDesc > label").disabled,
-         isControlled,
-         "TP control label is enabled.");
-    } else {
-      is(doc.getElementById("trackingProtectionMenu").disabled,
-         isControlled,
-         "TP control is enabled.");
-    }
+    is(doc.getElementById("trackingProtectionMenu").disabled,
+       isControlled,
+       "TP control is enabled.");
   }
 
   async function disableViaClick() {
-    let labelId = CONTROLLED_LABEL_ID[uiType];
-    let disableId = DISABLE_BUTTON_ID[uiType];
+    let labelId = CONTROLLED_LABEL_ID;
+    let disableId = DISABLE_BUTTON_ID;
     let controlledLabel = doc.getElementById(labelId);
 
     let enableMessageShown = waitForEnableMessage(labelId);
     doc.getElementById(disableId).click();
     await enableMessageShown;
 
     // The user is notified how to enable the extension.
     let controlledDesc = controlledLabel.querySelector("description");
@@ -665,23 +644,21 @@ add_task(async function testExtensionCon
 
     // The user can dismiss the enable instructions.
     let hidden = waitForMessageHidden(labelId);
     controlledLabel.querySelector("image:last-of-type").click();
     await hidden;
   }
 
   async function reEnableExtension(addon) {
-    let controlledMessageShown = waitForMessageShown(CONTROLLED_LABEL_ID[uiType]);
+    let controlledMessageShown = waitForMessageShown(CONTROLLED_LABEL_ID);
     await addon.enable();
     await controlledMessageShown;
   }
 
-  let uiType = "new";
-
   await openPreferencesViaOpenPreferencesAPI("panePrivacy", {leaveOpen: true});
   let doc = gBrowser.contentDocument;
 
   is(gBrowser.currentURI.spec, "about:preferences#privacy",
    "#privacy should be in the URI for about:preferences");
 
   verifyState(false);
 
@@ -691,48 +668,27 @@ add_task(async function testExtensionCon
     manifest: {
       name: "set_tp",
       applications: {gecko: {id: EXTENSION_ID}},
       permissions: ["privacy"],
     },
     background,
   });
 
-  let messageShown = waitForMessageShown(CONTROLLED_LABEL_ID[uiType]);
+  let messageShown = waitForMessageShown(CONTROLLED_LABEL_ID);
   await extension.startup();
   await messageShown;
   let addon = await AddonManager.getAddonByID(EXTENSION_ID);
 
   verifyState(true);
 
   await disableViaClick();
 
   verifyState(false);
 
-  // Switch to the "old" Tracking Protection UI.
-  uiType = "old";
-  Services.prefs.setBoolPref(CB_UI_PREF, false);
-
-  let browserLoaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, "about:preferences#privacy");
-  gBrowser.selectedBrowser.reload();
-  await browserLoaded;
-  is(gBrowser.currentURI.spec, "about:preferences#privacy",
-   "#privacy should be in the URI for about:preferences");
-  doc = gBrowser.contentDocument;
-
-  verifyState(false);
-
-  await reEnableExtension(addon);
-
-  verifyState(true);
-
-  await disableViaClick();
-
-  verifyState(false);
-
   // Enable the extension so we get the UNINSTALL event, which is needed by
   // ExtensionPreferencesManager to clean up properly.
   // TODO: BUG 1408226
   await reEnableExtension(addon);
 
   await extension.unload();
 
   BrowserTestUtils.removeTab(gBrowser.selectedTab);
--- a/browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_6.js
+++ b/browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_6.js
@@ -13,25 +13,16 @@ add_task(async function() {
  * Test for searching for the "Block Lists" subdialog.
  */
 add_task(async function() {
   async function doTest() {
     await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
     await evaluateSearchResults("block Web elements", "trackingGroup");
     BrowserTestUtils.removeTab(gBrowser.selectedTab);
   }
-  await SpecialPowers.pushPrefEnv({"set": [
-    ["browser.contentblocking.ui.enabled", true],
-  ]});
-  info("Run the test with Content Blocking UI enabled");
-  await doTest();
-  await SpecialPowers.pushPrefEnv({"set": [
-    ["browser.contentblocking.ui.enabled", false],
-  ]});
-  info("Run the test with Content Blocking UI disabled");
   await doTest();
 });
 
 /**
  * Test for searching for the "Allowed Sites - Pop-ups" subdialog.
  */
 add_task(async function() {
   await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
--- a/browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_site_data.js
+++ b/browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_site_data.js
@@ -2,53 +2,16 @@
 * This file contains tests for the Preferences search bar.
 */
 
 // Enabling Searching functionatily. Will display search bar form this testcase forward.
 add_task(async function() {
   await SpecialPowers.pushPrefEnv({"set": [["browser.preferences.search", true]]});
 });
 
-// First, run the tests without the Content Blocking UI.
-add_task(async function() {
-  await SpecialPowers.pushPrefEnv({"set": [["browser.contentblocking.ui.enabled", false]]});
-});
-
-/**
- * Test for searching for the "Settings - Site Data" subdialog.
- */
-add_task(async function() {
-  await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
-  await evaluateSearchResults("cookies", ["siteDataGroup"]);
-  BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-add_task(async function() {
-  await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
-  await evaluateSearchResults("site data", ["siteDataGroup"]);
-  BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-add_task(async function() {
-  await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
-  await evaluateSearchResults("cache", ["siteDataGroup"]);
-  BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-add_task(async function() {
-  await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
-  await evaluateSearchResults("third-party", "siteDataGroup");
-  BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-// Now, run the tests with the Content Blocking UI.
-add_task(async function() {
-  await SpecialPowers.pushPrefEnv({"set": [["browser.contentblocking.ui.enabled", true]]});
-});
-
 /**
  * Test for searching for the "Settings - Site Data" subdialog.
  */
 add_task(async function() {
   await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
   await evaluateSearchResults("cookies", ["siteDataGroup", "trackingGroup"]);
   BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
--- a/browser/components/preferences/in-content/tests/browser_spotlight.js
+++ b/browser/components/preferences/in-content/tests/browser_spotlight.js
@@ -48,17 +48,16 @@ add_task(async function test_form_autofi
   is(doc.querySelector(".spotlight").getAttribute("data-subcategory"), "form-autofill",
     "The form-autofill section is spotlighted.");
   BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 add_task(async function test_change_cookie_settings() {
   await SpecialPowers.pushPrefEnv({set: [
     ["browser.contentblocking.enabled", true],
-    ["browser.contentblocking.ui.enabled", true],
     ["browser.contentblocking.fastblock.ui.enabled", true],
     ["browser.contentblocking.trackingprotection.ui.enabled", true],
     ["browser.contentblocking.rejecttrackers.ui.enabled", true],
   ]});
   let prefs = await openPreferencesViaOpenPreferencesAPI("privacy-trackingprotection", {leaveOpen: true});
   is(prefs.selectedPane, "panePrivacy", "Privacy pane is selected by default");
   let doc = gBrowser.contentDocument;
   is(doc.location.hash, "#privacy", "The subcategory should be removed from the URI");
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -1,16 +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/.
 
 do-not-track-description = Send websites a “Do Not Track” signal that you don’t want to be tracked
 do-not-track-learn-more = Learn more
-do-not-track-option-default =
-    .label = Only when using Tracking Protection
 do-not-track-option-default-content-blocking =
     .label = Only when { -brand-short-name } is set to block Detected Trackers
 do-not-track-option-always =
     .label = Always
 
 pref-page =
     .title =
         { PLATFORM() ->
@@ -104,20 +102,16 @@ extension-controlled-web-notifications= 
 # This string is shown to notify the user that the default search engine
 # is being controlled by an extension.
 extension-controlled-default-search = An extension, <img data-l10n-name="icon"/> { $name }, has set your default search engine.
 
 # This string is shown to notify the user that Container Tabs
 # are being enabled by an extension.
 extension-controlled-privacy-containers = An extension, <img data-l10n-name="icon"/> { $name }, requires Container Tabs.
 
-# This string is shown to notify the user that their tracking protection preferences
-# are being controlled by an extension.
-extension-controlled-websites-tracking-protection-mode = An extension, <img data-l10n-name="icon"/> { $name }, is controlling tracking protection.
-
 # This string is shown to notify the user that their content blocking "All Detected Trackers"
 # preferences are being controlled by an extension.
 extension-controlled-websites-content-blocking-all-trackers = An extension, <img data-l10n-name="icon"/> { $name }, is controlling this setting.
 
 # This string is shown to notify the user that their proxy configuration preferences
 # are being controlled by an extension.
 extension-controlled-proxy-config = An extension, <img data-l10n-name="icon"/> { $name }, is controlling how { -brand-short-name } connects to the internet.
 
@@ -884,40 +878,20 @@ content-blocking-reject-trackers-block-t
   .label = Trackers
   .accesskey = k
 content-blocking-reject-trackers-all-third-parties-option =
   .label = All third-party cookies (may cause websites to break)
   .accesskey = A
 
 ## Privacy Section - Tracking
 
-tracking-header = Tracking Protection
-
-tracking-desc = Tracking Protection blocks online trackers that collect your browsing data across multiple websites. <a data-l10n-name="learn-more">Learn more about Tracking Protection and your privacy</a>
-
-tracking-mode-label = Use Tracking Protection to block known trackers
-
-tracking-mode-always =
-    .label = Always
-    .accesskey = y
-tracking-mode-private =
-    .label = Only in private windows
-    .accesskey = l
-tracking-mode-never =
-    .label = Never
-    .accesskey = N
-
 tracking-exceptions =
     .label = Exceptions…
     .accesskey = x
 
-tracking-change-block-list =
-    .label = Change Block List…
-    .accesskey = C
-
 ## Privacy Section - Permissions
 
 permissions-header = Permissions
 
 permissions-location = Location
 permissions-location-settings =
     .label = Settings…
     .accesskey = t
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -393,28 +393,20 @@ button > hbox > label {
   line-height: 30px;
 }
 
 #allowSmartSize {
   margin-top: 0;
   margin-bottom: 4px;
 }
 
-#trackingProtectionBox {
-  margin-top: 16px;
-}
-
 #doNotTrackLearnMoreBox {
   margin-top: 32px;
 }
 
-#trackingProtectionAdvancedSettings {
-  margin-inline-start: 15px;
-}
-
 #historyPane {
   margin-top: 4px;
 }
 
 #historyButtons {
   display: flex;
   flex-direction: column;
   justify-content: space-between;