diff --git a/browser/base/content/aboutDialog-appUpdater.js b/browser/base/content/aboutDialog-appUpdater.js index 972c47d8d9db..e838169cdf31 100644 --- a/browser/base/content/aboutDialog-appUpdater.js +++ b/browser/base/content/aboutDialog-appUpdater.js @@ -20,7 +20,7 @@ var gAppUpdater; function onUnload(aEvent) { if (gAppUpdater.isChecking) - gAppUpdater.checker.stopChecking(Ci.nsIUpdateChecker.CURRENT_CHECK); + gAppUpdater.checker.stopCurrentCheck(); // Safe to call even when there isn't a download in progress. gAppUpdater.removeDownloadListener(); gAppUpdater = null; @@ -60,8 +60,8 @@ function appUpdater(options = {}) { manualLink.href = manualURL; document.getElementById("failedLink").href = manualURL; - if (this.updateDisabledAndLocked) { - this.selectPanel("adminDisabled"); + if (this.updateDisabledByPolicy) { + this.selectPanel("policyDisabled"); return; } @@ -81,16 +81,6 @@ function appUpdater(options = {}) { return; } - // Honor the "Never check for updates" option by not only disabling background - // update checks, but also in the About dialog, by presenting a - // "Check for updates" button. - // If updates are found, the user is then asked if he wants to "Update to ". - if (!this.updateEnabled || - Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_NEVER)) { - this.selectPanel("checkForUpdates"); - return; - } - // That leaves the options // "Check for updates, but let me choose whether to install them", and // "Automatically install updates". @@ -135,25 +125,14 @@ appUpdater.prototype = this.um.activeUpdate.state == "downloading"; }, - // true when updating is disabled by an administrator. - get updateDisabledAndLocked() { - return (!this.updateEnabled && - Services.prefs.prefIsLocked("app.update.enabled")) || - (Services.policies && - !Services.policies.isAllowed("appUpdate")); - }, - - // true when updating is enabled. - get updateEnabled() { - try { - return Services.prefs.getBoolPref("app.update.enabled"); - } catch (e) { } - return true; // Firefox default is true + // true when updating has been disabled by enterprise policy + get updateDisabledByPolicy() { + return Services.policies && !Services.policies.isAllowed("appUpdate"); }, // true when updating in background is enabled. get backgroundUpdateEnabled() { - return this.updateEnabled && + return !this.updateDisabledByPolicy && gAppUpdater.aus.canStageUpdates; }, diff --git a/browser/base/content/aboutDialog.xul b/browser/base/content/aboutDialog.xul index 6740a722b95d..092e823749e7 100644 --- a/browser/base/content/aboutDialog.xul +++ b/browser/base/content/aboutDialog.xul @@ -93,7 +93,7 @@ - + diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index bf23960b5f5f..9fe57ad3fc7c 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -771,7 +771,6 @@ BrowserGlue.prototype = { _checkForOldBuildUpdates() { // check for update if our build is old if (AppConstants.MOZ_UPDATER && - Services.prefs.getBoolPref("app.update.enabled") && Services.prefs.getBoolPref("app.update.checkInstallTime")) { let buildID = Services.appinfo.appBuildID; diff --git a/browser/components/preferences/in-content/main.xul b/browser/components/preferences/in-content/main.xul index 8bbe4adcbbfb..3468c0db6b4a 100644 --- a/browser/components/preferences/in-content/main.xul +++ b/browser/components/preferences/in-content/main.xul @@ -484,7 +484,7 @@ accesskey="&update.checkForUpdatesButton.accesskey;" oncommand="gAppUpdater.checkForUpdates();"/> - +