AU: Push seeks in http fetching to the progress percentage.
The updater was reporting status as a fraction of bytes downloaded vs
total, ignoring any bytes that were skipped due to resuming an
upload. The result was that a user may see progress go from 0 to 60
percent, then reboot, then see progress go from 0 to 40 percent, then
finish.
This CL allows an HTTP fetcher to report to the delegate that it's
seeking to a particular offset.
BUG=8151
TEST=applied updates on the machine; unittest
Review URL: http://codereview.chromium.org/4131005
Change-Id: Ib9fe034ca3ffd17455af4cf89d5b28ec236104a0
diff --git a/download_action.h b/download_action.h
index 08035f0..d0ac175 100644
--- a/download_action.h
+++ b/download_action.h
@@ -86,6 +86,7 @@
// HttpFetcherDelegate methods (see http_fetcher.h)
virtual void ReceivedBytes(HttpFetcher *fetcher,
const char* bytes, int length);
+ virtual void SeekToOffset(off_t offset);
virtual void TransferComplete(HttpFetcher *fetcher, bool successful);
DownloadActionDelegate* delegate() const { return delegate_; }