Boilerplate for processing Gaps.
Add ProcessGap entry point to Uploader, so that later on StorageQueue will be able to call it whenever there are no records in the queue that server expects to get, or if records are corrupt (e.g., file was deleted or altered). Currently StorageQueue enumerated records from the first it has and calls ProcessRecord for every one. If something goes wrong, it bails out. The plan is to change it like this in further CLs: 1) Separate last confirmed seq id from the first queue has. 2) If the last confirmed is lower, call ProcessGap for all those that are missing. 3) If anything is wrong, call ProcessGap for that one and switch to the next record regardless. ProcessRecord will add EncryptedRecord with data to the request to send. ProcessGap will add one or more Encrypted records with no data - that seems to be the easiest approach. Bug: b:169248924 Change-Id: I3cd600daf819a5ca8428c79788669be59f6d01dc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463766 Commit-Queue: Leonid Baraz <lbaraz@chromium.org> Reviewed-by:Zach Trudo <zatrudo@google.com> Cr-Commit-Position: refs/heads/master@{#815881}
Showing
Please register or sign in to comment