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

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

Issue 2221323003: Add an API to Pause and Resume background offlining requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR feedback per Dimich 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 5c6c03ba07193c4a779da7d6ea1d0ead94cf177e..3e52021e3597ca352a12cc6d2fdacad9c25b6db8 100644
--- a/components/offline_pages/background/request_coordinator.h
+++ b/components/offline_pages/background/request_coordinator.h
@@ -55,6 +55,14 @@ class RequestCoordinator : public KeyedService {
// TODO(petewil): Add code to cancel an in-progress pre-render.
void RemoveRequests(const std::vector<ClientId>& client_ids);
+ // Pause a list of requests by |request_id|. This will change the state
+ // in the request queue so the request cannot be started.
+ // TODO(petewil): Add code to cancel an in-progress pre-render.
+ void PauseRequests(const std::vector<int64_t>& request_ids);
+
+ // Resume a list of previously paused requests, making them available.
+ void ResumeRequests(const std::vector<int64_t>& request_ids);
+
// Callback that receives the response for GetQueuedRequests. Client must
// copy the result right away, it goes out of scope at the end of the
// callback.

Powered by Google App Engine
This is Rietveld 408576698