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

Unified Diff: components/offline_pages/background/request_coordinator.cc

Issue 2239133002: [Offline pages] Downloads UI: Adding bridge for issuing notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@download-notifications
Patch Set: Minimizing the patch to handle direct WC capture on download button Created 4 years, 4 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/background/request_coordinator.cc
diff --git a/components/offline_pages/background/request_coordinator.cc b/components/offline_pages/background/request_coordinator.cc
index 63f5472fb787fe6a1b9329913551094a6667e1ee..80717b74ca42315eda5203df9f8a204df10e51c1 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -94,7 +94,6 @@ bool RequestCoordinator::SavePageLater(
queue_->AddRequest(request,
base::Bind(&RequestCoordinator::AddRequestResultCallback,
weak_ptr_factory_.GetWeakPtr()));
- NotifyAdded(request);
return true;
}
void RequestCoordinator::GetAllRequests(const GetRequestsCallback& callback) {
@@ -141,6 +140,7 @@ void RequestCoordinator::AddRequestResultCallback(
const SavePageRequest& request) {
// Inform the scheduler that we have an outstanding task..
scheduler_->Schedule(GetTriggerConditionsForUserRequest());
+ NotifyAdded(request);
}
// Called in response to updating a request in the request queue.

Powered by Google App Engine
This is Rietveld 408576698