gecko-dev/mobile/android/base
Grisha Kruglov 283d1a3450 Bug 1291821 - Allow BatchingDownloader to resume downloads using offset r=rnewman
BatchingDownloader uses provided RepositoryStateProvider instance in order to track
offset and high water mark as it performs batching.

The state holder objects are initialized by individual ServerSyncStages, and prefixes are used to ensure keys
won't clash.

Two RepositoryStateProvider implementations are used: persistent and non-persistent. Non-persistent
state provider does not allow for resuming after a sync restart, while persistent one does.

Persistent state provider is used by the history stage. It is fetched oldest-first, and records are applied
to live storage as they're downloaded. These conditions let use resume downloads. It's also possible to
resume downloads for stages which use a persistent buffer, but currently we do not have any.

Offset value and its context is reset if we hit a 412 error; it is maintained if we hit a sync deadline, allowing us to
minimize number of records we'll redownload. BatchingDownloaderController owns resuming and context checking logic.

High water mark (h.w.m.) is maintained across syncs and used instead of stage's "last-synced" timestamp if said stage is
set to fetch oldest-first and explicitely allows use of a h.w.m. Server15RepositorySession provides correct timestamp
to RecordsChannel, decoupling BatchingDownloader from this logic.

MozReview-Commit-ID: IH28YrDU4vW

--HG--
extra : rebase_source : 63bd7daaa1fd2a63e10289d6d4cd198aaf81498b
2017-01-19 13:11:18 -08:00
..
aidl/org/mozilla/gecko/media Bug 1324530 - part 3: make codec methods that change state(start, stop, flush, release) synchronous. r=snorp 2016-12-23 16:25:43 +08:00
crashreporter/res
java/org/mozilla/gecko Bug 1291821 - Move bulk insert logic for new history to BrowserProvider r=rnewman 2016-11-29 13:42:53 -08:00
locales Bug 1325264 - Update wording of 'disconnect from sync' dialog. r=Grisha 2017-01-27 18:11:44 +01:00
resources Bug 1325931 - Pre: add drawable padding to pin r=sebastian 2017-02-09 13:24:24 -08:00
adjust-sdk-sandbox.token
AdjustConstants.java.in Bug 1291366 - Part 1: Use GENERATED_FILES to produce AppConstants.java. r=gps 2016-11-14 20:06:31 -08:00
android-services.mozbuild Bug 1291821 - Allow BatchingDownloader to resume downloads using offset r=rnewman 2017-01-19 13:11:18 -08:00
AndroidManifest.xml.in Bug 1314466 - part 6, Add new files to build r=nalexander 2016-11-14 16:45:23 -08:00
AppConstants.java.in Bug 1312686 - Link "default browser" setting to app info screen on Android 7+; r=sebastian 2017-02-15 02:27:26 +05:30
FennecManifest_permissions.xml.in Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
GcmAndroidManifest_permissions.xml.in
GcmAndroidManifest_services.xml.in
geckoview.ddf Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
generate_build_config.py Bug 1291366 - Part 1: Use GENERATED_FILES to produce AppConstants.java. r=gps 2016-11-14 20:06:31 -08:00
Makefile.in Bug 1291366 - Part 1: Use GENERATED_FILES to produce AppConstants.java. r=gps 2016-11-14 20:06:31 -08:00
moz.build Bug 1322576 - [2.4] Add GeckoView settings management. r=snorp,jchen 2017-02-22 14:57:38 +01:00
package-name.txt.in
strings.xml.in Bug 1333589 - 1. Use GeckoBundle for DoorHanger.OnButtonClickListener; r=sebastian 2017-01-25 18:57:31 -05:00