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

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

Issue 2219393004: Adds an observer for the request coordinator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resumeAPI
Patch Set: Fix nits. 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 ca1e4d7480287dce8425c2ea2a468f75fd34b015..462b3f6291dfa4bcdf738d3f5bf4cdc12ae05436 100644
--- a/components/offline_pages/background/request_queue.h
+++ b/components/offline_pages/background/request_queue.h
@@ -59,8 +59,14 @@ class RequestQueue {
// Callback used by |UdpateRequest|.
typedef base::Callback<void(UpdateRequestResult)> UpdateRequestCallback;
+ // Callback used by |ChangeState| for more than one update at a time.
+ typedef base::Callback<void(const UpdateMultipleRequestResults& results,
+ const std::vector<SavePageRequest>& requests)>
+ UpdateMultipleRequestsCallback;
+
// Callback used by |RemoveRequests|.
- typedef base::Callback<void(const UpdateMultipleRequestResults& results)>
+ typedef base::Callback<void(const UpdateMultipleRequestResults& results,
+ const std::vector<SavePageRequest>& requests)>
RemoveRequestsCallback;
explicit RequestQueue(std::unique_ptr<RequestQueueStore> store);
@@ -95,7 +101,7 @@ class RequestQueue {
// request, and doesn't need to care what updates.
void ChangeRequestsState(const std::vector<int64_t>& request_ids,
const SavePageRequest::RequestState new_state,
- const UpdateRequestCallback& callback);
+ const UpdateMultipleRequestsCallback& callback);
void GetForUpdateDone(
const RequestQueue::UpdateRequestCallback& update_callback,

Powered by Google App Engine
This is Rietveld 408576698