Bug 493002 - List partially implemented engines (cookies, input history) as disabled

Import the outdated engines, but delete their pref so they show up as disabled. Clean up the old engines a little bit so they don't allocate unnecessarily and to not use syncCore.
This commit is contained in:
Edward Lee 2009-05-14 11:43:56 -05:00
parent 665e488e28
commit 93847aa32d
4 changed files with 23 additions and 63 deletions

View File

@ -43,7 +43,6 @@ const Cu = Components.utils;
Cu.import("resource://weave/log4moz.js");
Cu.import("resource://weave/async.js");
Cu.import("resource://weave/engines.js");
Cu.import("resource://weave/syncCores.js");
Cu.import("resource://weave/stores.js");
Cu.import("resource://weave/trackers.js");
@ -53,7 +52,7 @@ function CookieEngine(pbeId) {
this._init(pbeId);
}
CookieEngine.prototype = {
__proto__: new SyncEngine(),
__proto__: SyncEngine.prototype,
get name() { return "cookies"; },
get displayName() { return "Cookies"; },
@ -67,13 +66,6 @@ CookieEngine.prototype = {
return this.__store;
},
__core: null,
get _core() {
if (!this.__core)
this.__core = new CookieSyncCore(this._store);
return this.__core;
},
__tracker: null,
get _tracker() {
if (!this.__tracker)
@ -82,27 +74,9 @@ CookieEngine.prototype = {
}
};
function CookieSyncCore(store) {
this._store = store;
this._init();
}
CookieSyncCore.prototype = {
_logName: "CookieSync",
_store: null,
_commandLike: function CSC_commandLike(a, b) {
/* Method required to be overridden.
a and b each have a .data and a .GUID
If this function returns true, an editCommand will be
generated to try to resolve the thing.
but are a and b objects of the type in the Store or
are they "commands"?? */
return false;
}
};
CookieSyncCore.prototype.__proto__ = new SyncCore();
function CookieStore( cookieManagerStub ) {
// XXX disabled for now..
return;
/* If no argument is passed in, this store will query/write to the real
Mozilla cookie manager component. This is the normal way to use this
class in production code. But for unit-testing purposes, you can pass
@ -111,6 +85,7 @@ function CookieStore( cookieManagerStub ) {
this._cookieManagerStub = cookieManagerStub;
}
CookieStore.prototype = {
__proto__: Store.prototype,
_logName: "CookieStore",
_lookup: null,
@ -297,12 +272,14 @@ CookieStore.prototype = {
nothing to do here. */
}
};
CookieStore.prototype.__proto__ = new Store();
function CookieTracker() {
// XXX disabled for now..
return;
this._init();
}
CookieTracker.prototype = {
__proto__: Tracker.prototype,
_logName: "CookieTracker",
_init: function CT__init() {
@ -332,4 +309,3 @@ CookieTracker.prototype = {
}
}
}
CookieTracker.prototype.__proto__ = new Tracker();

View File

@ -44,7 +44,6 @@ Cu.import("resource://weave/log4moz.js");
Cu.import("resource://weave/async.js");
Cu.import("resource://weave/util.js");
Cu.import("resource://weave/engines.js");
Cu.import("resource://weave/syncCores.js");
Cu.import("resource://weave/stores.js");
Cu.import("resource://weave/trackers.js");
@ -54,10 +53,10 @@ function InputEngine(pbeId) {
this._init(pbeId);
}
InputEngine.prototype = {
__proto__: new SyncEngine(),
__proto__: SyncEngine.prototype,
get name() { return "input"; },
get displayName() { return "Input History"; },
get displayName() { return "Input History (Location Bar)"; },
get logName() { return "InputEngine"; },
get serverPrefix() { return "user-data/input/"; },
@ -68,13 +67,6 @@ InputEngine.prototype = {
return this.__store;
},
__core: null,
get _core() {
if (!this.__core)
this.__core = new InputSyncCore(this._store);
return this.__core;
},
__tracker: null,
get _tracker() {
if (!this.__tracker)
@ -83,25 +75,13 @@ InputEngine.prototype = {
}
};
function InputSyncCore(store) {
this._store = store;
this._init();
}
InputSyncCore.prototype = {
_logName: "InputSync",
_store: null,
_commandLike: function FSC_commandLike(a, b) {
/* Not required as GUIDs for similar data sets will be the same */
return false;
}
};
InputSyncCore.prototype.__proto__ = new SyncCore();
function InputStore() {
// XXX disabled for now..
return;
this._init();
}
InputStore.prototype = {
__proto__: Store.prototype,
_logName: "InputStore",
_lookup: null,
@ -231,12 +211,14 @@ InputStore.prototype = {
// Not needed.
}
};
InputStore.prototype.__proto__ = new Store();
function InputTracker() {
// XXX disabled for now..
return;
this._init();
}
InputTracker.prototype = {
__proto__: Tracker.prototype,
_logName: "InputTracker",
__placeDB: null,
@ -292,4 +274,3 @@ InputTracker.prototype = {
stmnt.reset();
}
};
InputTracker.prototype.__proto__ = new Tracker();

View File

@ -98,8 +98,10 @@ Cu.import("resource://weave/engines.js", Weave);
Cu.import("resource://weave/engines/bookmarks.js", Weave);
Cu.import("resource://weave/engines/clientData.js", Weave);
Cu.import("resource://weave/engines/cookies.js", Weave);
Cu.import("resource://weave/engines/forms.js", Weave);
Cu.import("resource://weave/engines/history.js", Weave);
Cu.import("resource://weave/engines/input.js", Weave);
Cu.import("resource://weave/engines/passwords.js", Weave);
Cu.import("resource://weave/engines/tabs.js", Weave);
@ -389,7 +391,8 @@ WeaveSvc.prototype = {
break;
case "Firefox":
engines = ["Bookmarks", "Form", "History", "Password", "Tab"];
engines = ["Bookmarks", "Cookie", "Form", "History", "Input",
"Password", "Tab"];
break;
case "SeaMonkey":

View File

@ -15,12 +15,12 @@ pref("extensions.weave.schedule", 1);
pref("extensions.weave.syncOnQuit.enabled", true);
pref("extensions.weave.engine.bookmarks", true);
pref("extensions.weave.engine.history", true);
pref("extensions.weave.engine.cookies", false);
pref("extensions.weave.engine.passwords", true);
//pref("extensions.weave.engine.cookies", false);
pref("extensions.weave.engine.forms", false);
pref("extensions.weave.engine.history", true);
//pref("extensions.weave.engine.input", false);
pref("extensions.weave.engine.passwords", true);
pref("extensions.weave.engine.tabs", true);
pref("extensions.weave.engine.input", false);
pref("extensions.weave.log.appender.console", "Warn");
pref("extensions.weave.log.appender.dump", "Error");