Bug 1405166 - Remove system-disabled pref from Screenshots; r=kmag
authorJared Hirsch <ohai@6a68.net>
Tue, 03 Oct 2017 09:09:38 -0700
changeset 427463 77d4d9eb87cdd939e579fb780562faebc8968f31
parent 427462 aa679e64c2714fa2926b500f05ce97d7cdd688f2
child 427464 d15f945998db3300700a7d0bfc0e329fb770fb93
push id97
push userfmarier@mozilla.com
push dateSat, 14 Oct 2017 01:12:59 +0000
reviewerskmag
bugs1405166
milestone58.0a1
Bug 1405166 - Remove system-disabled pref from Screenshots; r=kmag MozReview-Commit-ID: KuDfW6EZMWZ
browser/extensions/screenshots/bootstrap.js
--- a/browser/extensions/screenshots/bootstrap.js
+++ b/browser/extensions/screenshots/bootstrap.js
@@ -2,17 +2,16 @@
 // TODO: re-enable
 /* eslint-disable */
 const OLD_ADDON_PREF_NAME = "extensions.jid1-NeEaf3sAHdKHPA@jetpack.deviceIdInfo";
 const OLD_ADDON_ID = "jid1-NeEaf3sAHdKHPA@jetpack";
 const ADDON_ID = "screenshots@mozilla.org";
 const TELEMETRY_ENABLED_PREF = "datareporting.healthreport.uploadEnabled";
 const PREF_BRANCH = "extensions.screenshots.";
 const USER_DISABLE_PREF = "extensions.screenshots.disabled";
-const SYSTEM_DISABLE_PREF = "extensions.screenshots.system-disabled";
 
 const { interfaces: Ci, utils: Cu } = Components;
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
                                   "resource://gre/modules/AddonManager.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
                                   "resource://gre/modules/AppConstants.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Console",
@@ -40,17 +39,17 @@ const prefObserver = {
 
   unregister() {
     prefs.removeObserver(PREF_BRANCH, this, false); // eslint-disable-line mozilla/no-useless-parameters
   },
 
   observe(aSubject, aTopic, aData) {
     // aSubject is the nsIPrefBranch we're observing (after appropriate QI)
     // aData is the name of the pref that's been changed (relative to aSubject)
-    if (aData == USER_DISABLE_PREF || aData == SYSTEM_DISABLE_PREF) {
+    if (aData == USER_DISABLE_PREF) {
       // eslint-disable-next-line promise/catch-or-return
       appStartupPromise = appStartupPromise.then(handleStartup);
     }
   }
 };
 
 const appStartupObserver = {
   register() {
@@ -158,17 +157,17 @@ function install(data, reason) {} // esl
 
 function uninstall(data, reason) {} // eslint-disable-line no-unused-vars
 
 function getBoolPref(pref) {
   return prefs.getPrefType(pref) && prefs.getBoolPref(pref);
 }
 
 function shouldDisable() {
-  return getBoolPref(USER_DISABLE_PREF) || getBoolPref(SYSTEM_DISABLE_PREF);
+  return getBoolPref(USER_DISABLE_PREF);
 }
 
 function handleStartup() {
   const webExtension = LegacyExtensionsUtils.getEmbeddedExtensionFor({
     id: ADDON_ID,
     resourceURI: addonResourceURI
   });