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

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

Issue 2197573003: Provide API in RequestCoordinator to remove results by client ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment changes per feedback 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_store.h
diff --git a/components/offline_pages/background/request_queue_store.h b/components/offline_pages/background/request_queue_store.h
index 0fd34a32aed34abaa1a57108d63751e5797f384a..d4a9d3527a3a16e716d87e4e3b0f7435e1a38540 100644
--- a/components/offline_pages/background/request_queue_store.h
+++ b/components/offline_pages/background/request_queue_store.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/callback.h"
+#include "components/offline_pages/offline_page_item.h"
namespace offline_pages {
@@ -51,6 +52,15 @@ class RequestQueueStore {
virtual void RemoveRequests(const std::vector<int64_t>& request_ids,
const RemoveCallback& callback) = 0;
+ // Asynchronously removes requests from the store using their ClientIds.
+ // Result of the update, and a number of removed pages is passed in the
+ // callback. Result of remove should be false, when one of the provided items
+ // couldn't be deleted, e.g. because it was missing. In case client_ids is
+ // empty, though this will return true, but the count of deleted pages will be
+ // 0.
+ virtual void RemoveRequestsByClientId(const std::vector<ClientId>& client_ids,
+ const RemoveCallback& callback) = 0;
+
// Resets the store.
virtual void Reset(const ResetCallback& callback) = 0;
};

Powered by Google App Engine
This is Rietveld 408576698