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

Unified Diff: components/offline_pages/background/request_queue_store.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: Switch to request ID as key 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_queue_store.h
diff --git a/components/offline_pages/background/request_queue_store.h b/components/offline_pages/background/request_queue_store.h
index d4a9d3527a3a16e716d87e4e3b0f7435e1a38540..890e08e4e771004030f6259c37ee33a46278fa98 100644
--- a/components/offline_pages/background/request_queue_store.h
+++ b/components/offline_pages/background/request_queue_store.h
@@ -61,6 +61,16 @@ class RequestQueueStore {
virtual void RemoveRequestsByClientId(const std::vector<ClientId>& client_ids,
const RemoveCallback& callback) = 0;
+ // Asynchronously pauses requests from the store using their request id.
+ virtual void PauseRequests(const std::vector<int64_t>& request_ids,
+ const UpdateCallback& callback) = 0;
+
+ // Asynchronously resumes requests from the store using their request id.
+ // This will set the state from PAUSED back to AVAILABLE, so the request can
+ // be picked up on the next scheduled run.
+ virtual void ResumeRequests(const std::vector<int64_t>& request_ids,
+ const UpdateCallback& callback) = 0;
+
// Resets the store.
virtual void Reset(const ResetCallback& callback) = 0;
};

Powered by Google App Engine
This is Rietveld 408576698