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

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

Issue 2493683002: [OfflinePages] Fixes RequestCoordinator bug not clearing state on timeout (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.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.h
diff --git a/components/offline_pages/background/request_coordinator.h b/components/offline_pages/background/request_coordinator.h
index 0f41c2bfb9f8202ca172b4228d0c79d5130449f6..719c65c632588c52baf96a12258bea466e626bdc 100644
--- a/components/offline_pages/background/request_coordinator.h
+++ b/components/offline_pages/background/request_coordinator.h
@@ -294,14 +294,23 @@ class RequestCoordinator : public KeyedService,
void OfflinerDoneCallback(const SavePageRequest& request,
Offliner::RequestStatus status);
+ // Records a completed attempt for the request and update it in the queue
+ // (possibly removing it).
+ void UpdateRequestForCompletedAttempt(const SavePageRequest& request,
+ Offliner::RequestStatus status);
+
+ // Returns whether we should try another request based on the outcome
+ // of the previous one.
+ bool ShouldTryNextRequest(Offliner::RequestStatus previous_request_status);
+
void TryNextRequest();
// If there is an active request in the list, cancel that request.
bool CancelActiveRequestIfItMatches(const std::vector<int64_t>& request_ids);
// Records an aborted attempt for the request and update it in the queue
- // (possibly removing it). Returns the updated copy.
- void AbortRequestAttempt(const SavePageRequest& request);
+ // (possibly removing it).
+ void UpdateRequestForAbortedAttempt(const SavePageRequest& request);
// Remove the attempted request from the queue with status to pass through to
// any observers and UMA histogram.
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698