зеркало из https://github.com/mozilla/gecko-dev.git
Bug 554472 - Only sync prefs under extensions.weave.prefs.sync. (with a trailing dot) [r=mconnor]
Add a "." to the end of WEAVE_SYNC_PREFS value and fix up uses that did extra work to remove the dot (or something that might not have been a dot).
This commit is contained in:
Родитель
7bf23a06a0
Коммит
9406f55ac2
|
@ -40,7 +40,7 @@ const Cc = Components.classes;
|
|||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
const WEAVE_SYNC_PREFS = "extensions.weave.prefs.sync";
|
||||
const WEAVE_SYNC_PREFS = "extensions.weave.prefs.sync.";
|
||||
const WEAVE_PREFS_GUID = "preferences";
|
||||
|
||||
Cu.import("resource://weave/util.js");
|
||||
|
@ -91,8 +91,7 @@ PrefStore.prototype = {
|
|||
get _syncPrefs() {
|
||||
let service = Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefService);
|
||||
let syncPrefs = service.getBranch(WEAVE_SYNC_PREFS).getChildList("", {}).
|
||||
map(function(elem) { return elem.substr(1); });
|
||||
let syncPrefs = service.getBranch(WEAVE_SYNC_PREFS).getChildList("", {});
|
||||
|
||||
this.__defineGetter__("_syncPrefs", function() syncPrefs);
|
||||
return syncPrefs;
|
||||
|
@ -104,7 +103,7 @@ PrefStore.prototype = {
|
|||
|
||||
let pref;
|
||||
for (let i = 0; i < toSync.length; i++) {
|
||||
if (!this._prefs.getBoolPref(WEAVE_SYNC_PREFS + "." + toSync[i]))
|
||||
if (!this._prefs.getBoolPref(WEAVE_SYNC_PREFS + toSync[i]))
|
||||
continue;
|
||||
|
||||
pref = {};
|
||||
|
@ -230,8 +229,7 @@ PrefTracker.prototype = {
|
|||
get _syncPrefs() {
|
||||
let service = Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefService);
|
||||
let syncPrefs = service.getBranch(WEAVE_SYNC_PREFS).getChildList("", {}).
|
||||
map(function(elem) { return elem.substr(1); });
|
||||
let syncPrefs = service.getBranch(WEAVE_SYNC_PREFS).getChildList("", {});
|
||||
|
||||
this.__defineGetter__("_syncPrefs", function() syncPrefs);
|
||||
return syncPrefs;
|
||||
|
|
Загрузка…
Ссылка в новой задаче