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

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

Issue 2266323002: Cancel prerendering when a request is paused or removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR feedback per DougArnett 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
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 2b874332bc58508c60d21a306186a16b792aed2c..8f203d8c496bd6b24f77008b5e203c918e9e9b88 100644
--- a/components/offline_pages/background/request_coordinator.h
+++ b/components/offline_pages/background/request_coordinator.h
@@ -174,6 +174,9 @@ class RequestCoordinator : public KeyedService, public RequestNotifier {
// Callback from the request picker when no more requests are in the queue.
void RequestQueueEmpty();
+ // Cancels an in progress pre-rendering, and updates state appropriately.
+ void StopPrerendering();
+
void SendRequestToOffliner(const SavePageRequest& request);
// Called by the offliner when an offlining request is completed. (and by
@@ -183,6 +186,9 @@ class RequestCoordinator : public KeyedService, public RequestNotifier {
void TryNextRequest();
+ // If there is an active request in the list, cancel that request.
+ bool CancelActiveRequestIfItMatches(const std::vector<int64_t>& request_ids);
+
// Returns the appropriate offliner to use, getting a new one from the factory
// if needed.
void GetOffliner();

Powered by Google App Engine
This is Rietveld 408576698