Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: multi_http_fetcher.h

Issue 4131005: AU: Push seeks in http fetching to the progress percentage. (Closed) Base URL: http://git.chromium.org/git/update_engine.git
Patch Set: fix for review Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mock_http_fetcher.h ('k') | prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: multi_http_fetcher.h
diff --git a/multi_http_fetcher.h b/multi_http_fetcher.h
index 43281990952ffa668cdd1574b51495c81dfffd39..692054dded1f790fd6ebad1f940e4aa4139f515e 100644
--- a/multi_http_fetcher.h
+++ b/multi_http_fetcher.h
@@ -122,6 +122,8 @@ class MultiHttpFetcher : public HttpFetcher, public HttpFetcherDelegate {
<< ranges_[current_index_].second << ")";
bytes_received_this_fetcher_ = 0;
fetchers_[current_index_]->SetOffset(ranges_[current_index_].first);
+ if (delegate_)
+ delegate_->SeekToOffset(ranges_[current_index_].first);
fetchers_[current_index_]->BeginTransfer(url_);
}
@@ -141,8 +143,9 @@ class MultiHttpFetcher : public HttpFetcher, public HttpFetcherDelegate {
bytes_received_this_fetcher_);
}
LOG_IF(WARNING, next_size <= 0) << "Asked to write length <= 0";
- if (delegate_)
+ if (delegate_) {
delegate_->ReceivedBytes(this, bytes, next_size);
+ }
bytes_received_this_fetcher_ += length;
if (ranges_[current_index_].second >= 0 &&
bytes_received_this_fetcher_ >= ranges_[current_index_].second) {
« no previous file with comments | « mock_http_fetcher.h ('k') | prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698