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

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

Issue 2454123003: count timeout as a completed attempt. (Closed)
Patch Set: Created 4 years, 2 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 5b12e4443f6e20ab5b96b28de9ba227085c20b5c..2b8b6a5f7fbbaa83370654d48d47d7f2d15f95b2 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -211,6 +211,13 @@ void RequestCoordinator::StopPrerendering(Offliner::RequestStatus stop_status) {
if (offliner_ && is_busy_) {
DCHECK(active_request_.get());
offliner_->Cancel();
+
+ // If we timed out, let the offliner done callback handle it.
dougarnett 2016/10/28 16:13:11 This will dramatically diminish the success rate f
Pete Williamson 2016/10/28 18:32:38 Done.
+ if (stop_status == Offliner::RequestStatus::REQUEST_COORDINATOR_TIMED_OUT)
+ return;
+
+ // Otherwise, this attempt never really had a chance to run, mark it
+ // aborted.
AbortRequestAttempt(active_request_.get());
}
« 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