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

Unified Diff: components/offline_pages/background/request_queue.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.h
diff --git a/components/offline_pages/background/request_queue.h b/components/offline_pages/background/request_queue.h
index 429c3757b89acc1cec1d65eb7cab9bc9fc604378..e294a6859ad3f27dae6a1f6e85746125ebad6531 100644
--- a/components/offline_pages/background/request_queue.h
+++ b/components/offline_pages/background/request_queue.h
@@ -83,6 +83,16 @@ class RequestQueue {
void RemoveRequestsByClientId(const std::vector<ClientId>& client_id,
const UpdateRequestCallback& callback);
+ // Pauses the requests matching the |request_ids|. Results are returned
+ // through |callback|.
+ void PauseRequests(const std::vector<int64_t>& request_ids,
+ const UpdateRequestCallback& callback);
+
+ // Resumes the requests matching the |request_ids|. Results are returned
+ // through |callback|.
+ void ResumeRequests(const std::vector<int64_t>& request_ids,
+ const UpdateRequestCallback& callback);
+
void GetForUpdateDone(
const RequestQueue::UpdateRequestCallback& update_callback,
const SavePageRequest& update_request,

Powered by Google App Engine
This is Rietveld 408576698