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

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

Issue 2373933003: [Offline pages] Updating RequestQueue::RemoveRequests to use a TaskQueue (Closed)
Patch Set: Addressing final feedback Created 4 years, 2 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 445a1f9a332b29e1fdcb7bd023f6f63e1f54e47e..988038fc6aa435ea815898c339c1e3d33a81751d 100644
--- a/components/offline_pages/background/request_queue.h
+++ b/components/offline_pages/background/request_queue.h
@@ -48,10 +48,6 @@ class RequestQueue {
// exist.
};
- // Type for a pair of request_id and result.
- typedef std::vector<std::pair<int64_t, UpdateRequestResult>>
- UpdateMultipleRequestResults;
-
// Callback used for |GetRequests|.
typedef base::Callback<void(GetRequestsResult,
std::vector<std::unique_ptr<SavePageRequest>>)>
@@ -68,18 +64,6 @@ 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,
- std::vector<std::unique_ptr<SavePageRequest>> requests)>
- UpdateMultipleRequestsCallback;
-
- // Callback used by |RemoveRequests|.
- typedef base::Callback<void(
- const UpdateMultipleRequestResults& results,
- std::vector<std::unique_ptr<SavePageRequest>> requests)>
- RemoveRequestsCallback;
-
explicit RequestQueue(std::unique_ptr<RequestQueueStore> store);
~RequestQueue();
@@ -103,7 +87,7 @@ class RequestQueue {
// |callback|. If a request id cannot be removed, this will still remove the
// others.
void RemoveRequests(const std::vector<int64_t>& request_ids,
- const RemoveRequestsCallback& callback);
+ const UpdateCallback& callback);
// Changes the state to |new_state| for requests matching the
// |request_ids|. Results are returned through |callback|.
« no previous file with comments | « components/offline_pages/background/request_picker.cc ('k') | components/offline_pages/background/request_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698