mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 527766 - Sync history pages with a single visit
Backout bug 518972 (6954c93b8903) so now we push all data instead of pages with more than 1 visit.
This commit is contained in:
parent
5013b211cb
commit
89460e2378
@ -339,10 +339,6 @@ SyncEngine.prototype = {
|
||||
this._toFetch = o));
|
||||
},
|
||||
|
||||
_makeUploadColl: function _makeUploadColl() {
|
||||
return new Collection(this.engineURL);
|
||||
},
|
||||
|
||||
// Create a new record by querying the store, and add the engine metadata
|
||||
_createRecord: function SyncEngine__createRecord(id) {
|
||||
return this._store.createRecord(id, this.cryptoMetaURL);
|
||||
@ -598,7 +594,7 @@ SyncEngine.prototype = {
|
||||
this._log.debug("Preparing " + outnum + " outgoing records");
|
||||
|
||||
// collection we'll upload
|
||||
let up = this._makeUploadColl();
|
||||
let up = new Collection(this.engineURL);
|
||||
let count = 0;
|
||||
|
||||
// Upload what we've got so far in the collection
|
||||
|
@ -87,19 +87,6 @@ HistoryEngine.prototype = {
|
||||
|
||||
_findDupe: function _findDupe(item) {
|
||||
return GUIDForUri(item.histUri);
|
||||
},
|
||||
|
||||
_makeUploadColl: function _makeUploadColl() {
|
||||
let coll = SyncEngine.prototype._makeUploadColl.call(this);
|
||||
let origPush = coll.pushData;
|
||||
|
||||
// Only push the data for upload if it has more than 1 visit
|
||||
coll.pushData = function(data) {
|
||||
if (data._visitCount > 1)
|
||||
origPush.call(coll, data);
|
||||
};
|
||||
|
||||
return coll;
|
||||
}
|
||||
};
|
||||
|
||||
@ -273,10 +260,6 @@ HistoryStore.prototype = {
|
||||
record.sortindex = foo.frecency;
|
||||
record.visits = this._getVisits(record.histUri);
|
||||
record.encryption = cryptoMetaURL;
|
||||
|
||||
// XXX Add a value to the object so that pushData can read out, but we end
|
||||
// up encrypting the data before calling pushData :(
|
||||
record._visitCount = record.visits.length;
|
||||
}
|
||||
else
|
||||
record.deleted = true;
|
||||
|
Loading…
Reference in New Issue
Block a user