Bug 625295 - Allow for per-engine sort parameters to download bookmarks by sortindex. r=rnewman

This commit is contained in:
Edouard Oger 2014-11-13 20:05:28 +01:00
parent f25cf095d1
commit 17f7932e3f
2 changed files with 8 additions and 0 deletions

View File

@ -702,6 +702,9 @@ SyncEngine.prototype = {
_recordObj: CryptoWrapper, _recordObj: CryptoWrapper,
version: 1, version: 1,
// Which sortindex to use when retrieving records for this engine.
_defaultSort: undefined,
// A relative priority to use when computing an order // A relative priority to use when computing an order
// for engines to be synced. Higher-priority engines // for engines to be synced. Higher-priority engines
// (lower numbers) are synced first. // (lower numbers) are synced first.
@ -929,6 +932,10 @@ SyncEngine.prototype = {
newitems = this._itemSource(); newitems = this._itemSource();
} }
if (this._defaultSort) {
newitems.sort = this._defaultSort;
}
if (isMobile) { if (isMobile) {
batchSize = MOBILE_BATCH_SIZE; batchSize = MOBILE_BATCH_SIZE;
} }

View File

@ -202,6 +202,7 @@ BookmarksEngine.prototype = {
_storeObj: BookmarksStore, _storeObj: BookmarksStore,
_trackerObj: BookmarksTracker, _trackerObj: BookmarksTracker,
version: 2, version: 2,
_defaultSort: "index",
syncPriority: 4, syncPriority: 4,