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

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

Issue 2071403003: Revises RequestCoordinator to not try to schedule another request when previous one fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | components/offline_pages/background/request_coordinator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a910ff2307b7a8859275ef24555df9f6e99f6e64..d5e87d26a47a8fd93aa7af30aa2dacef1ad23837 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -137,17 +137,18 @@ void RequestCoordinator::OfflinerDoneCallback(const SavePageRequest& request,
<< __FUNCTION__;
last_offlining_status_ = status;
- // TODO(petewil): If the request succeeded, remove it from the Queue.
+ // If the request succeeded, remove it from the Queue and maybe schedule
+ // another one.
if (status == Offliner::RequestStatus::SAVED) {
queue_->RemoveRequest(request.request_id(),
base::Bind(&RequestCoordinator::UpdateRequestCallback,
weak_ptr_factory_.GetWeakPtr()));
- }
- // TODO(petewil): Check time budget. Return to the scheduler if we are out.
+ // TODO(petewil): Check time budget. Return to the scheduler if we are out.
- // Start a request if we have time.
- TryNextRequest();
+ // Start another request if we have time.
+ TryNextRequest();
+ }
}
} // namespace offline_pages
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698