From c27c49821cc3551e5eba7de81d22caddaf5d4823 Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Mon, 30 Nov 2009 12:15:18 -0800 Subject: [PATCH] Bug 530823 - Engines need to be able to specify a prefName for sharing prefs (different history types) Use prefName for checking if an engine is enabled and have forms share a prefName with history. --- services/sync/modules/engines.js | 5 +++-- services/sync/modules/engines/forms.js | 1 + services/sync/services-sync.js | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/services/sync/modules/engines.js b/services/sync/modules/engines.js index 2431062d310e..0e24e9fc1dc5 100644 --- a/services/sync/modules/engines.js +++ b/services/sync/modules/engines.js @@ -144,8 +144,9 @@ Engine.prototype = { _storeObj: Store, _trackerObj: Tracker, - get enabled() Svc.Prefs.get("engine." + this.name, null), - set enabled(val) Svc.Prefs.set("engine." + this.name, !!val), + get prefName() this.name, + get enabled() Svc.Prefs.get("engine." + this.prefName, null), + set enabled(val) Svc.Prefs.set("engine." + this.prefName, !!val), get score() this._tracker.score, diff --git a/services/sync/modules/engines/forms.js b/services/sync/modules/engines/forms.js index 004c75dbf1a9..8fa36d7a221f 100644 --- a/services/sync/modules/engines/forms.js +++ b/services/sync/modules/engines/forms.js @@ -59,6 +59,7 @@ FormEngine.prototype = { _storeObj: FormStore, _trackerObj: FormTracker, _recordObj: FormRec, + get prefName() "history", _syncStartup: function FormEngine__syncStartup() { this._store.cacheFormItems(); diff --git a/services/sync/services-sync.js b/services/sync/services-sync.js index e229ff809d9d..7aed038775a3 100644 --- a/services/sync/services-sync.js +++ b/services/sync/services-sync.js @@ -10,7 +10,6 @@ pref("extensions.weave.lastversion", "firstrun"); pref("extensions.weave.autoconnect", true); pref("extensions.weave.engine.bookmarks", true); -pref("extensions.weave.engine.forms", true); pref("extensions.weave.engine.history", true); pref("extensions.weave.engine.passwords", true); pref("extensions.weave.engine.prefs", true);