зеркало из https://github.com/mozilla/gecko-dev.git
Merged
This commit is contained in:
Коммит
55d3388e52
|
@ -96,7 +96,7 @@ ClientStore.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_ClientStore_init: function ClientStore__init() {
|
_ClientStore_init: function ClientStore__init() {
|
||||||
this.__proto__.__proto__._init.call(this);
|
this._init.call(this);
|
||||||
this.clients = {};
|
this.clients = {};
|
||||||
this.loadSnapshot();
|
this.loadSnapshot();
|
||||||
},
|
},
|
||||||
|
|
|
@ -50,17 +50,17 @@ Cu.import("resource://weave/constants.js");
|
||||||
|
|
||||||
Function.prototype.async = Async.sugar;
|
Function.prototype.async = Async.sugar;
|
||||||
|
|
||||||
function TabEngine(pbeId) {
|
function TabEngine() {
|
||||||
this._init(pbeId);
|
this._init();
|
||||||
}
|
}
|
||||||
|
|
||||||
TabEngine.prototype = {
|
TabEngine.prototype = {
|
||||||
__proto__: new BlobEngine(),
|
__proto__: SyncEngine.prototype,
|
||||||
|
name: "tabs",
|
||||||
get name() "tabs",
|
displayName: "Tabs",
|
||||||
get displayName() { return "Tabs"; },
|
logName: "Tabs",
|
||||||
get logName() "TabEngine",
|
_storeObj: TabStore,
|
||||||
get serverPrefix() "user-data/tabs/",
|
_trackerObj: TabTracker,
|
||||||
|
_recordObj: ClientTabsRecord
|
||||||
|
|
||||||
get virtualTabs() {
|
get virtualTabs() {
|
||||||
let virtualTabs = {};
|
let virtualTabs = {};
|
||||||
|
@ -76,28 +76,15 @@ TabEngine.prototype = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return virtualTabs;
|
return virtualTabs;
|
||||||
},
|
|
||||||
|
|
||||||
get _store() {
|
|
||||||
let store = new TabStore();
|
|
||||||
this.__defineGetter__("_store", function() store);
|
|
||||||
return this._store;
|
|
||||||
},
|
|
||||||
|
|
||||||
get _tracker() {
|
|
||||||
let tracker = new TabTracker(this);
|
|
||||||
this.__defineGetter__("_tracker", function() tracker);
|
|
||||||
return this._tracker;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function TabStore() {
|
function TabStore() {
|
||||||
this._init();
|
this._TabStore_init();
|
||||||
}
|
}
|
||||||
TabStore.prototype = {
|
TabStore.prototype = {
|
||||||
__proto__: new Store(),
|
__proto__: new Store(),
|
||||||
_logName: "TabStore",
|
_logName: "Tabs.Store",
|
||||||
|
|
||||||
get _sessionStore() {
|
get _sessionStore() {
|
||||||
let sessionStore = Cc["@mozilla.org/browser/sessionstore;1"].
|
let sessionStore = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||||
|
|
|
@ -474,10 +474,14 @@ WeaveSvc.prototype = {
|
||||||
|
|
||||||
this._log.debug("Logging in user " + this.username);
|
this._log.debug("Logging in user " + this.username);
|
||||||
|
|
||||||
|
try {
|
||||||
yield this.verifyLogin(self.cb, this.username, this.password);
|
yield this.verifyLogin(self.cb, this.username, this.password);
|
||||||
|
|
||||||
this._loggedIn = true;
|
this._loggedIn = true;
|
||||||
self.done(true);
|
self.done(true);
|
||||||
|
} catch (e) {
|
||||||
|
this._loggedIn = false;
|
||||||
|
self.done(false);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this._localLock(
|
this._localLock(
|
||||||
this._catchAll(
|
this._catchAll(
|
||||||
|
|
Загрузка…
Ссылка в новой задаче