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

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

Issue 2697493002: [Offline pages] Implementation of OfflineBackgroundTask using background_task_scheduler (Closed)
Patch Set: Addressing more feedback Created 3 years, 10 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/core/background/request_coordinator.cc
diff --git a/components/offline_pages/core/background/request_coordinator.cc b/components/offline_pages/core/background/request_coordinator.cc
index 661445a81900505609b68742d689f4d1b0ca195a..5a363c0a8b056e1a7edc003e0180e37577d5891b 100644
--- a/components/offline_pages/core/background/request_coordinator.cc
+++ b/components/offline_pages/core/background/request_coordinator.cc
@@ -268,11 +268,11 @@ void RequestCoordinator::StopPrerendering(Offliner::RequestStatus stop_status) {
DCHECK(active_request_.get());
offliner_->Cancel();
- if (stop_status == Offliner::RequestStatus::REQUEST_COORDINATOR_TIMED_OUT) {
+ if (stop_status == Offliner::RequestStatus::REQUEST_COORDINATOR_TIMED_OUT ||
+ stop_status == Offliner::RequestStatus::BACKGROUND_SCHEDULER_CANCELED) {
// Consider watchdog timeout a completed attempt.
SavePageRequest request(*active_request_.get());
- UpdateRequestForCompletedAttempt(request,
- Offliner::REQUEST_COORDINATOR_TIMED_OUT);
+ UpdateRequestForCompletedAttempt(request, stop_status);
} else {
// Otherwise consider this stop an aborted attempt.
UpdateRequestForAbortedAttempt(*active_request_.get());

Powered by Google App Engine
This is Rietveld 408576698