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.
This commit is contained in:
Edward Lee 2009-11-30 12:15:18 -08:00
parent c3f5e5f0a5
commit c27c49821c
3 changed files with 4 additions and 3 deletions

View File

@ -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,

View File

@ -59,6 +59,7 @@ FormEngine.prototype = {
_storeObj: FormStore,
_trackerObj: FormTracker,
_recordObj: FormRec,
get prefName() "history",
_syncStartup: function FormEngine__syncStartup() {
this._store.cacheFormItems();

View File

@ -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);