summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/update/content/updates.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-03-25 17:47:59 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-03-25 17:47:59 +0100
commit917a2c450f08ab4c934c9938319f10a1114272b4 (patch)
tree79394bdbef8c5bc90734918a9f862efaf6ec2e1a /toolkit/mozapps/update/content/updates.js
parenteb77e289bbe056b58051db0fa868e95da803aa0a (diff)
parenta1ad1d835b66e9300cc011244a23aea5d660baf1 (diff)
downloadUXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar
UXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar.gz
UXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar.lz
UXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar.xz
UXP-917a2c450f08ab4c934c9938319f10a1114272b4.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP
Diffstat (limited to 'toolkit/mozapps/update/content/updates.js')
-rw-r--r--toolkit/mozapps/update/content/updates.js28
1 files changed, 3 insertions, 25 deletions
diff --git a/toolkit/mozapps/update/content/updates.js b/toolkit/mozapps/update/content/updates.js
index 6e8de7275..9996014b5 100644
--- a/toolkit/mozapps/update/content/updates.js
+++ b/toolkit/mozapps/update/content/updates.js
@@ -85,28 +85,6 @@ function openUpdateURL(event) {
}
/**
- * Gets a preference value, handling the case where there is no default.
- * @param func
- * The name of the preference function to call, on nsIPrefBranch
- * @param preference
- * The name of the preference
- * @param defaultValue
- * The default value to return in the event the preference has
- * no setting
- * @returns The value of the preference, or undefined if there was no
- * user or default value.
- */
-function getPref(func, preference, defaultValue) {
- try {
- return Services.prefs[func](preference);
- }
- catch (e) {
- LOG("General", "getPref - failed to get preference: " + preference);
- }
- return defaultValue;
-}
-
-/**
* A set of shared data and control functions for the wizard as a whole.
*/
var gUpdates = {
@@ -320,7 +298,7 @@ var gUpdates = {
onLoad: function() {
this.wiz = document.documentElement;
- gLogEnabled = getPref("getBoolPref", PREF_APP_UPDATE_LOG, false);
+ gLogEnabled = Services.prefs.getBoolPref(PREF_APP_UPDATE_LOG, false);
this.strings = document.getElementById("updateStrings");
var brandStrings = document.getElementById("brandStrings");
@@ -601,7 +579,7 @@ var gNoUpdatesPage = {
LOG("gNoUpdatesPage", "onPageShow - could not select an appropriate " +
"update. Either there were no updates or |selectUpdate| failed");
- if (getPref("getBoolPref", PREF_APP_UPDATE_ENABLED, true))
+ if (Services.prefs.getBoolPref(PREF_APP_UPDATE_ENABLED, true))
document.getElementById("noUpdatesAutoEnabled").hidden = false;
else
document.getElementById("noUpdatesAutoDisabled").hidden = false;
@@ -1309,7 +1287,7 @@ var gFinishedPage = {
moreElevatedLinkLabel.setAttribute("hidden", "false");
}
- if (getPref("getBoolPref", PREF_APP_UPDATE_TEST_LOOP, false)) {
+ if (Services.prefs.getBoolPref(PREF_APP_UPDATE_TEST_LOOP, false)) {
setTimeout(function () { gUpdates.wiz.getButton("finish").click(); },
UPDATE_TEST_LOOP_INTERVAL);
}