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

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

Issue 2256373002: Adds request queue removal capability to OfflinePageBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@query-queue
Patch Set: Rebase. 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
« no previous file with comments | « components/offline_pages/BUILD.gn ('k') | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/background/request_coordinator.h
diff --git a/components/offline_pages/background/request_coordinator.h b/components/offline_pages/background/request_coordinator.h
index 276836163296839a0266cbdaf73d1f2344d1740a..885970c48613a59961b4d31060ae96b0b408a254 100644
--- a/components/offline_pages/background/request_coordinator.h
+++ b/components/offline_pages/background/request_coordinator.h
@@ -65,10 +65,16 @@ class RequestCoordinator : public KeyedService, public RequestNotifier {
bool SavePageLater(
const GURL& url, const ClientId& client_id, bool user_reqeusted);
+ // Callback specifying which request IDs were actually removed.
+ typedef base::Callback<void(
+ const RequestQueue::UpdateMultipleRequestResults&)>
+ RemoveRequestsCallback;
+
// Remove a list of requests by |request_id|. This removes requests from the
// request queue, but does not cancel an in-progress pre-render.
// TODO(petewil): Add code to cancel an in-progress pre-render.
- void RemoveRequests(const std::vector<int64_t>& request_ids);
+ void RemoveRequests(const std::vector<int64_t>& request_ids,
+ const RemoveRequestsCallback& callback);
// Pause a list of requests by |request_id|. This will change the state
// in the request queue so the request cannot be started.
@@ -164,7 +170,12 @@ class RequestCoordinator : public KeyedService, public RequestNotifier {
const RequestQueue::UpdateMultipleRequestResults& result,
const std::vector<SavePageRequest>& requests);
- void RemoveRequestsCallback(
+ void HandleRemovedRequestsAndCallback(
+ const RemoveRequestsCallback& callback,
+ const RequestQueue::UpdateMultipleRequestResults& results,
+ const std::vector<SavePageRequest>& requests);
+
+ void HandleRemovedRequests(
const RequestQueue::UpdateMultipleRequestResults& results,
const std::vector<SavePageRequest>& requests);
« no previous file with comments | « components/offline_pages/BUILD.gn ('k') | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698