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

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

Issue 2361883002: [Offline Pages] Adds classification of some prerender FinalStatus codes as canceled operations or a… (Closed)
Patch Set: Merge Created 4 years, 3 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 891054b43123c20f367c99f6561cfe2429534cea..6927acb77ef059c3fbc411350ccb8ba786387332 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -522,6 +522,9 @@ void RequestCoordinator::OfflinerDoneCallback(const SavePageRequest& request,
} else if (status == Offliner::RequestStatus::SAVED) {
// Remove the request from the queue if it succeeded.
RemoveAttemptedRequest(request, BackgroundSavePageResult::SUCCESS);
+ } else if (status == Offliner::RequestStatus::PRERENDERING_FAILED_NO_RETRY) {
+ RemoveAttemptedRequest(request,
+ BackgroundSavePageResult::PRERENDER_FAILURE);
} else if (request.completed_attempt_count() + 1 >=
policy_->GetMaxCompletedTries()) {
// Remove from the request queue if we exceeded max retries. The +1
@@ -547,13 +550,12 @@ void RequestCoordinator::OfflinerDoneCallback(const SavePageRequest& request,
// Determine whether we might try another request in this
// processing window based on how the previous request completed.
- //
- // TODO(dougarnett): Need to split PRERENDERING_FAILED into separate
- // codes as to whether we should try another request or not.
switch (status) {
case Offliner::RequestStatus::SAVED:
case Offliner::RequestStatus::SAVE_FAILED:
- case Offliner::RequestStatus::REQUEST_COORDINATOR_CANCELED: // timeout
+ case Offliner::RequestStatus::REQUEST_COORDINATOR_CANCELED:
+ case Offliner::RequestStatus::REQUEST_COORDINATOR_TIMED_OUT:
+ case Offliner::RequestStatus::PRERENDERING_FAILED_NO_RETRY:
// Consider processing another request in this service window.
TryNextRequest();
break;

Powered by Google App Engine
This is Rietveld 408576698