mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1357517 - Remove Preferences.jsm usage from addoncompat component. r=MattN
--HG-- extra : rebase_source : 8de07eb0b95e54fa127d1b85c8b678ac1bc236d1
This commit is contained in:
parent
7cdc5b4c65
commit
b9ce857041
@ -10,9 +10,6 @@ const Cu = Components.utils;
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
|
||||
"resource://gre/modules/Preferences.jsm");
|
||||
|
||||
// Rules are defined at the bottom of this file.
|
||||
var PrefetcherRules = {};
|
||||
|
||||
@ -348,7 +345,7 @@ var Prefetcher = {
|
||||
}
|
||||
}
|
||||
|
||||
this.prefetchingEnabled = Preferences.get(PREF_PREFETCHING_ENABLED, false);
|
||||
this.prefetchingEnabled = Services.prefs.getBoolPref(PREF_PREFETCHING_ENABLED, false);
|
||||
Services.prefs.addObserver(PREF_PREFETCHING_ENABLED, this);
|
||||
Services.obs.addObserver(this, "xpcom-shutdown");
|
||||
},
|
||||
@ -358,7 +355,7 @@ var Prefetcher = {
|
||||
Services.prefs.removeObserver(PREF_PREFETCHING_ENABLED, this);
|
||||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
} else if (topic == PREF_PREFETCHING_ENABLED) {
|
||||
this.prefetchingEnabled = Preferences.get(PREF_PREFETCHING_ENABLED, false);
|
||||
this.prefetchingEnabled = Services.prefs.getBoolPref(PREF_PREFETCHING_ENABLED, false);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user