зеркало из https://github.com/mozilla/gecko-dev.git
Merge weave to weave-partial-view.
This commit is contained in:
Коммит
1a4b100a73
|
@ -578,8 +578,9 @@ SyncEngine.prototype = {
|
|||
// Upload outgoing records
|
||||
_uploadOutgoing: function SyncEngine__uploadOutgoing() {
|
||||
let outnum = [i for (i in this._tracker.changedIDs)].length;
|
||||
this._log.debug("Preparing " + outnum + " outgoing records");
|
||||
if (outnum) {
|
||||
this._log.debug("Preparing " + outnum + " outgoing records");
|
||||
|
||||
// collection we'll upload
|
||||
let up = new Collection(this.engineURL);
|
||||
let count = 0;
|
||||
|
|
|
@ -230,14 +230,11 @@ HistoryStore.prototype = {
|
|||
if (this.urlExists(uri))
|
||||
curvisits = this._getVisits(record.histUri);
|
||||
|
||||
let visit;
|
||||
while ((visit = record.visits.pop())) {
|
||||
if (curvisits.filter(function(i) i.date == visit.date).length)
|
||||
continue;
|
||||
this._log.debug(" visit " + visit.date);
|
||||
this._hsvc.addVisit(uri, visit.date, null, visit.type,
|
||||
(visit.type == 5 || visit.type == 6), 0);
|
||||
}
|
||||
// Add visits if there's no local visit with the same date
|
||||
for each (let {date, type} in record.visits)
|
||||
if (curvisits.every(function(cur) cur.date != date))
|
||||
Svc.History.addVisit(uri, date, null, type, type == 5 || type == 6, 0);
|
||||
|
||||
this._hsvc.setPageTitle(uri, record.title);
|
||||
},
|
||||
|
||||
|
|
|
@ -240,8 +240,18 @@ Resource.prototype = {
|
|||
if (this._log.level <= Log4Moz.Level.Trace)
|
||||
this._log.trace(action + " Body: " + this._data);
|
||||
}
|
||||
else
|
||||
this._log.debug(action + " fail: " + status + " " + this._data);
|
||||
else {
|
||||
let log = "debug";
|
||||
let mesg = action + " fail: " + status;
|
||||
|
||||
// Only log the full response body (may be HTML) when Trace logging
|
||||
if (this._log.level <= Log4Moz.Level.Trace) {
|
||||
log = "trace";
|
||||
mesg += " " + this._data;
|
||||
}
|
||||
|
||||
this._log[log](mesg);
|
||||
}
|
||||
}
|
||||
// Got a response but no header; must be cached (use default values)
|
||||
catch(ex) {
|
||||
|
|
|
@ -488,8 +488,6 @@ WeaveSvc.prototype = {
|
|||
|
||||
_verifyLogin: function _verifyLogin()
|
||||
this._catch(this._notify("verify-login", "", function() {
|
||||
this._log.debug("Verifying login for user " + this.username);
|
||||
|
||||
this._setCluster();
|
||||
let res = new Resource(this.infoURL);
|
||||
try {
|
||||
|
@ -521,7 +519,6 @@ WeaveSvc.prototype = {
|
|||
|
||||
_verifyPassphrase: function _verifyPassphrase()
|
||||
this._catch(this._notify("verify-passphrase", "", function() {
|
||||
this._log.debug("Verifying passphrase");
|
||||
try {
|
||||
let pubkey = PubKeys.getDefaultKey();
|
||||
let privkey = PrivKeys.get(pubkey.privateKeyUri);
|
||||
|
@ -665,7 +662,7 @@ WeaveSvc.prototype = {
|
|||
this._setSyncFailure(LOGIN_FAILED_NO_PASSWORD);
|
||||
throw "No password given or found in password manager";
|
||||
}
|
||||
this._log.debug("Logging in user " + this.username);
|
||||
this._log.info("Logging in user " + this.username);
|
||||
|
||||
if (!this._verifyLogin()) {
|
||||
// verifyLogin sets the failure states here
|
||||
|
@ -1079,7 +1076,7 @@ WeaveSvc.prototype = {
|
|||
for each (let engine in [Clients].concat(Engines.getEnabled()))
|
||||
engine.lastModified = info.obj[engine.name] || 0;
|
||||
|
||||
this._log.debug("Refreshing client list");
|
||||
this._log.trace("Refreshing client list");
|
||||
Clients.sync();
|
||||
|
||||
// Process the incoming commands if we have any
|
||||
|
|
Загрузка…
Ссылка в новой задаче