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

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

Issue 2454123003: count timeout as a completed attempt. (Closed)
Patch Set: merge Created 4 years, 1 month 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 cfc32ed6421536e1e1db56baee43602706767d15..020965f80957760860138120404d2997cd1164b3 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -212,6 +212,13 @@ void RequestCoordinator::StopPrerendering(Offliner::RequestStatus stop_status) {
DCHECK(active_request_.get());
offliner_->Cancel();
+ // If we timed out, let the offliner done callback handle it.
+ if (processing_state_ == ProcessingWindowState::IMMEDIATE_WINDOW &&
+ 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