Bug 1502237 - Remove the pref for controlling whether the tracker cookie blocking setting would appear in the Cookies and Site Data drop-down r=johannh
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 26 Oct 2018 07:01:43 +0000
changeset 443195 8db8e74f328a25596a6f934b9ef66006217c3dc8
parent 443194 8bc3d56b3ef1c885fadb3dd759e586e12be14c3b
child 443196 ce8127ea1c4bc1d53304e7e91a2224991fe17659
push id34944
push userncsoregi@mozilla.com
push dateSat, 27 Oct 2018 09:49:55 +0000
treeherdermozilla-central@49d47a692ca4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1502237
milestone65.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 1502237 - Remove the pref for controlling whether the tracker cookie blocking setting would appear in the Cookies and Site Data drop-down r=johannh Differential Revision: https://phabricator.services.mozilla.com/D9878
browser/app/profile/firefox.js
browser/components/preferences/in-content/privacy.js
browser/components/preferences/in-content/privacy.xul
browser/components/preferences/in-content/tests/browser.ini
browser/components/preferences/in-content/tests/browser_privacypane_2.js
browser/components/preferences/in-content/tests/browser_privacypane_4.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1526,17 +1526,16 @@ pref("browser.contentblocking.global-tog
 pref("dom.storage_access.enabled", true);
 #endif
 
 // Define a set of default features for the Content Blocking UI.
 pref("browser.contentblocking.trackingprotection.ui.enabled", true);
 pref("browser.contentblocking.trackingprotection.control-center.ui.enabled", true);
 pref("browser.contentblocking.rejecttrackers.ui.enabled", true);
 pref("browser.contentblocking.rejecttrackers.control-center.ui.enabled", true);
-pref("browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", true);
 
 // Enable the Report Breakage UI on Nightly and Beta but not on Release yet.
 #ifdef EARLY_BETA_OR_EARLIER
 pref("browser.contentblocking.reportBreakage.enabled", true);
 #else
 pref("browser.contentblocking.reportBreakage.enabled", false);
 #endif
 // Show report breakage for tracking cookies in all channels.
--- 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, "contentBlockingCookiesAndSiteDataRejectTrackersEnabled",
-                                      "browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled");
-
 XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingTrackingProtectionUiEnabled",
                                       "browser.contentblocking.trackingprotection.ui.enabled");
 
 XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingRejectTrackersUiEnabled",
                                       "browser.contentblocking.rejecttrackers.ui.enabled");
 
 XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingEnabled",
                                       "browser.contentblocking.enabled");
@@ -517,22 +514,16 @@ var gPrivacyPane = {
   /**
    * Changes the visibility of elements in the CB section depending on the
    * content blocking UI prefs.
    */
   updateContentBlockingVisibility() {
     // Potentially hide the global toggle.
     document.getElementById("contentBlockingCheckboxContainer").hidden =
       !Services.prefs.getBoolPref("browser.contentblocking.global-toggle.enabled", true);
-
-    // Allow hiding the Reject Trackers option based on a pref
-    let blockCookiesFromTrackers = document.getElementById("blockCookiesFromTrackers");
-    if (!contentBlockingCookiesAndSiteDataRejectTrackersEnabled) {
-      blockCookiesFromTrackers.remove();
-    }
   },
 
   /**
    * Updates the preferences UI to reflect the browser.contentblocking.enabled pref.
    * This affects the button to toggle the pref and the disabled state of the dependent controls.
    */
   updateContentBlockingToggle() {
     let onOrOff = contentBlockingEnabled ? "on" : "off";
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -190,17 +190,17 @@
           <label id="blockCookiesLabel" control="blockCookiesMenu"
                  data-l10n-id="sitedata-block-desc"/>
           <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
           <hbox>
             <menulist id="blockCookiesMenu" preference="network.cookie.cookieBehavior"
                       onsyncfrompreference="return gPrivacyPane.readBlockCookiesFrom();"
                       onsynctopreference="return gPrivacyPane.writeBlockCookiesFrom();">
               <menupopup>
-                <menuitem id="blockCookiesFromTrackers" data-l10n-id="sitedata-block-trackers-option-recommended" value="trackers"/>
+                <menuitem data-l10n-id="sitedata-block-trackers-option-recommended" value="trackers"/>
                 <menuitem data-l10n-id="sitedata-block-unvisited-option" value="unvisited"/>
                 <menuitem data-l10n-id="sitedata-block-all-third-party-option" value="all-third-parties"/>
                 <menuitem data-l10n-id="sitedata-block-all-option" value="always"/>
               </menupopup>
             </menulist>
           </hbox>
         </hbox>
         <hbox id="keepRow"
--- a/browser/components/preferences/in-content/tests/browser.ini
+++ b/browser/components/preferences/in-content/tests/browser.ini
@@ -69,17 +69,16 @@ skip-if = e10s
 [browser_proxy_backup.js]
 [browser_privacypane.js]
 run-if = nightly_build
 # browser_privacypane.js only has Browser Error collection tests currently,
 # which is disabled outside Nightly. Remove this once non-Nightly tests are
 # added.
 [browser_privacypane_2.js]
 [browser_privacypane_3.js]
-[browser_privacypane_4.js]
 [browser_privacypane_5.js]
 [browser_sanitizeOnShutdown_prefLocked.js]
 [browser_searchShowSuggestionsFirst.js]
 [browser_searchsuggestions.js]
 [browser_security-1.js]
 [browser_security-2.js]
 [browser_spotlight.js]
 [browser_site_login_exceptions.js]
--- a/browser/components/preferences/in-content/tests/browser_privacypane_2.js
+++ b/browser/components/preferences/in-content/tests/browser_privacypane_2.js
@@ -2,19 +2,15 @@ let rootDir = getRootDirectory(gTestPath
 let jar = getJar(rootDir);
 if (jar) {
   let tmpdir = extractJarToTmp(jar);
   rootDir = "file://" + tmpdir.path + "/";
 }
 /* import-globals-from privacypane_tests_perwindow.js */
 Services.scriptloader.loadSubScript(rootDir + "privacypane_tests_perwindow.js", this);
 
-SpecialPowers.pushPrefEnv({"set":
-  [["browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", false]],
-});
-
 run_test_subset([
   test_pane_visibility,
   test_dependent_elements,
   test_dependent_cookie_elements,
   test_dependent_clearonclose_elements,
   test_dependent_prefs,
 ]);
deleted file mode 100644
--- a/browser/components/preferences/in-content/tests/browser_privacypane_4.js
+++ /dev/null
@@ -1,20 +0,0 @@
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from privacypane_tests_perwindow.js */
-Services.scriptloader.loadSubScript(rootDir + "privacypane_tests_perwindow.js", this);
-
-SpecialPowers.pushPrefEnv({"set":
-  [["browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", false]],
-});
-
-run_test_subset([
-  test_pane_visibility,
-  test_dependent_elements,
-  test_dependent_cookie_elements,
-  test_dependent_clearonclose_elements,
-  test_dependent_prefs,
-]);