Index: components/offline_pages/background/request_queue.cc |
diff --git a/components/offline_pages/background/request_queue.cc b/components/offline_pages/background/request_queue.cc |
index 6d1e8bf8a3925f99f087fb843bc70e7a3aa6b941..155072b5a69e4c0be49204a07a80832e43720b7e 100644 |
--- a/components/offline_pages/background/request_queue.cc |
+++ b/components/offline_pages/background/request_queue.cc |
@@ -39,6 +39,7 @@ void AddRequestDone(const RequestQueue::AddRequestCallback& callback, |
} |
// Completes the update request call. |
+// TODO(petewil): Move callers to the UpdateMultipleRequestDone callback |
void UpdateRequestDone(const RequestQueue::UpdateRequestCallback& callback, |
RequestQueueStore::UpdateStatus status) { |
RequestQueue::UpdateRequestResult result = |
@@ -48,12 +49,20 @@ void UpdateRequestDone(const RequestQueue::UpdateRequestCallback& callback, |
callback.Run(result); |
} |
+// Handles updating multiple requests at the same time. |
+void UpdateMultipleRequestsDone( |
+ const RequestQueue::UpdateMultipleRequestsCallback& callback, |
+ const RequestQueue::UpdateMultipleRequestResults& results, |
+ const std::vector<SavePageRequest>& requests) { |
+ callback.Run(results, requests); |
+} |
// Completes the remove request call. |
void RemoveRequestsDone( |
const RequestQueue::RemoveRequestsCallback& callback, |
- const RequestQueue::UpdateMultipleRequestResults& results) { |
- callback.Run(results); |
+ const RequestQueue::UpdateMultipleRequestResults& results, |
+ const std::vector<SavePageRequest>& requests) { |
+ callback.Run(results, requests); |
} |
} // namespace |
@@ -133,9 +142,9 @@ void RequestQueue::RemoveRequests(const std::vector<int64_t>& request_ids, |
void RequestQueue::ChangeRequestsState( |
const std::vector<int64_t>& request_ids, |
const SavePageRequest::RequestState new_state, |
- const UpdateRequestCallback& callback) { |
+ const UpdateMultipleRequestsCallback& callback) { |
store_->ChangeRequestsState(request_ids, new_state, |
- base::Bind(UpdateRequestDone, callback)); |
+ base::Bind(UpdateMultipleRequestsDone, callback)); |
} |
void RequestQueue::PurgeRequests(const PurgeRequestsCallback& callback) {} |