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

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

Issue 2196293002: Skips processing more SavePageLater requests in current processing window when one completes unsucc… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Allow processing to continue for some cases with TODO to split PrerenderingFailed 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
« 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 5876d8386d79b7c3834f6cf9b7d72bd22f8c38cd..91771f0e28c9a55b1b19b0eb531b5d4dbcb2f4ac 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -228,7 +228,22 @@ void RequestCoordinator::OfflinerDoneCallback(const SavePageRequest& request,
weak_ptr_factory_.GetWeakPtr()));
}
- TryNextRequest();
+ // 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:
fgorski 2016/08/03 03:40:04 It is a bit worrying that you have two scope opera
dougarnett 2016/08/03 15:33:26 worrying? This is part of the Offliner interface s
fgorski 2016/08/03 16:18:59 Acknowledged.
+ case Offliner::RequestStatus::SAVE_FAILED:
+ case Offliner::RequestStatus::REQUEST_COORDINATOR_CANCELED: // timeout
+ case Offliner::RequestStatus::PRERENDERING_CANCELED:
Pete Williamson 2016/08/02 22:20:00 Good! Let's be a bit more explicit for the cases w
dougarnett 2016/08/03 15:33:26 Done.
+ TryNextRequest();
+ break;
+ default:
+ // Stop further processing in this service window.
fgorski 2016/08/03 03:40:05 https://google.github.io/styleguide/cppguide.html#
dougarnett 2016/08/03 15:33:26 Done.
+ break;
+ }
}
const Scheduler::TriggerConditions
« 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