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

Unified Diff: components/offline_pages/core/downloads/download_notifying_observer.cc

Issue 2736843002: Fix the Download Notifications for Offline Pages to indicate bytes loaded. (Closed)
Patch Set: more fixes to more tests. Created 3 years, 9 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
Index: components/offline_pages/core/downloads/download_notifying_observer.cc
diff --git a/components/offline_pages/core/downloads/download_notifying_observer.cc b/components/offline_pages/core/downloads/download_notifying_observer.cc
index cca7406a97dd23b3dccc1d1fb5ffdb527109bc22..3783608812919c0e4d552a013c512ed46c4621eb 100644
--- a/components/offline_pages/core/downloads/download_notifying_observer.cc
+++ b/components/offline_pages/core/downloads/download_notifying_observer.cc
@@ -64,6 +64,14 @@ void DownloadNotifyingObserver::OnChanged(const SavePageRequest& request) {
NotifyRequestStateChange(request);
}
+void DownloadNotifyingObserver::OnNetworkProgress(
+ const SavePageRequest& request,
+ int64_t received_bytes) {
+ DownloadUIItem item(request);
+ item.download_progress_bytes = received_bytes;
+ notifier_->NotifyDownloadProgress(item);
+}
+
void DownloadNotifyingObserver::OnCompleted(
const SavePageRequest& request,
RequestCoordinator::BackgroundSavePageResult status) {

Powered by Google App Engine
This is Rietveld 408576698