Bug 1485839 - Remove the obsolete privacy.restrict3rdpartystorage.ui.enabled pref; r=nika
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 23 Aug 2018 19:29:21 -0400
changeset 491348 7d267beb1d1fe34dc9fc43c5913230d4b473a9de
parent 491347 8e9cb8f36114e0d2c2b7594d4d124784b6d41483
child 491349 b8fdb9372c775f81cbe2f5da4e4c2257433980a2
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1485839
milestone63.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 1485839 - Remove the obsolete privacy.restrict3rdpartystorage.ui.enabled pref; r=nika
dom/base/nsContentUtils.cpp
dom/base/nsContentUtils.h
modules/libpref/init/StaticPrefList.h
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -334,16 +334,18 @@ uint32_t nsContentUtils::sCookiesLifetim
 
 nsHtml5StringParser* nsContentUtils::sHTMLFragmentParser = nullptr;
 nsIParser* nsContentUtils::sXMLFragmentParser = nullptr;
 nsIFragmentContentSink* nsContentUtils::sXMLFragmentSink = nullptr;
 bool nsContentUtils::sFragmentParsingActive = false;
 
 bool nsContentUtils::sDoNotTrackEnabled = false;
 
+bool nsContentUtils::sAntiTrackingControlCenterUIEnabled = false;
+
 mozilla::LazyLogModule nsContentUtils::sDOMDumpLog("Dump");
 
 PopupControlState nsContentUtils::sPopupControlState = openAbused;
 
 int32_t nsContentUtils::sInnerOrOuterWindowCount = 0;
 uint32_t nsContentUtils::sInnerOrOuterWindowSerialCounter = 0;
 
 // Subset of http://www.whatwg.org/specs/web-apps/current-work/#autofill-field-name
@@ -732,16 +734,19 @@ nsContentUtils::Init()
                                "browser.autofocus", true);
 
   Preferences::AddBoolVarCache(&sIsBytecodeCacheEnabled,
                                "dom.script_loader.bytecode_cache.enabled", false);
 
   Preferences::AddBoolVarCache(&sDisablePopups,
                                "dom.disable_open_during_load", false);
 
+  Preferences::AddBoolVarCache(&sAntiTrackingControlCenterUIEnabled,
+                               "browser.contentblocking.rejecttrackers.control-center.ui.enabled", false);
+
   Preferences::AddIntVarCache(&sBytecodeCacheStrategy,
                               "dom.script_loader.bytecode_cache.strategy", 0);
 
   nsDependentCString buildID(mozilla::PlatformBuildID());
   sJSBytecodeMimeType = new nsCString(NS_LITERAL_CSTRING("javascript/moz-bytecode-") + buildID);
 
   Element::InitCCCallbacks();
 
@@ -8906,18 +8911,17 @@ StorageDisabledByAntiTrackingInternal(ns
 bool
 nsContentUtils::StorageDisabledByAntiTracking(nsPIDOMWindowInner* aWindow,
                                               nsIChannel* aChannel,
                                               nsIPrincipal* aPrincipal,
                                               nsIURI* aURI)
 {
   bool disabled =
     StorageDisabledByAntiTrackingInternal(aWindow, aChannel, aPrincipal, aURI);
-  if (disabled &&
-      StaticPrefs::privacy_restrict3rdpartystorage_ui_enabled()) {
+  if (disabled && sAntiTrackingControlCenterUIEnabled) {
     nsCOMPtr<mozIThirdPartyUtil> thirdPartyUtil = services::GetThirdPartyUtil();
     if (!thirdPartyUtil) {
       return false;
     }
 
     nsCOMPtr<nsPIDOMWindowOuter> pwin;
     if (aWindow) {
       auto* outer = nsGlobalWindowOuter::Cast(aWindow->GetOuterWindow());
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -3474,17 +3474,17 @@ private:
   static bool sShowInputPlaceholderOnFocus;
   static bool sAutoFocusEnabled;
 #ifndef RELEASE_OR_BETA
   static bool sBypassCSSOMOriginCheck;
 #endif
   static bool sIsBytecodeCacheEnabled;
   static int32_t sBytecodeCacheStrategy;
   static uint32_t sCookiesLifetimePolicy;
-  static bool sShortcutsCustomized;
+  static bool sAntiTrackingControlCenterUIEnabled;
 
   static int32_t sPrivacyMaxInnerWidth;
   static int32_t sPrivacyMaxInnerHeight;
 
   class UserInteractionObserver;
   static UserInteractionObserver* sUserInteractionObserver;
 
   static nsHtml5StringParser* sHTMLFragmentParser;
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -1248,22 +1248,16 @@ PREF("preferences.allow.omt-write", bool
 
 // Whether Content Blocking has been enabled
 VARCACHE_PREF(
   "browser.contentblocking.enabled",
    browser_contentblocking_enabled,
   bool, true
 )
 
-VARCACHE_PREF(
-  "privacy.restrict3rdpartystorage.ui.enabled",
-   privacy_restrict3rdpartystorage_ui_enabled,
-  RelaxedAtomicBool, false
-)
-
 // Anti-tracking permission expiration
 VARCACHE_PREF(
   "privacy.restrict3rdpartystorage.expiration",
    privacy_restrict3rdpartystorage_expiration,
   uint32_t, 2592000 // 30 days (in seconds)
 )
 
 //---------------------------------------------------------------------------