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

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

Issue 2221323003: Add an API to Pause and Resume background offlining requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR feedback per Dimich 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_in_memory_store.h
diff --git a/components/offline_pages/background/request_queue_in_memory_store.h b/components/offline_pages/background/request_queue_in_memory_store.h
index cc02921c6d94bb2b0d778e32c6bd691b92be432d..768f48f1760069d9c842e46473a893e2853f1a8a 100644
--- a/components/offline_pages/background/request_queue_in_memory_store.h
+++ b/components/offline_pages/background/request_queue_in_memory_store.h
@@ -11,11 +11,10 @@
#include "base/macros.h"
#include "components/offline_pages/background/request_queue_store.h"
+#include "components/offline_pages/background/save_page_request.h"
namespace offline_pages {
-class SavePageRequest;
-
// Interface for classes storing save page requests.
class RequestQueueInMemoryStore : public RequestQueueStore {
public:
@@ -24,6 +23,7 @@ class RequestQueueInMemoryStore : public RequestQueueStore {
// RequestQueueStore implementaiton.
void GetRequests(const GetRequestsCallback& callback) override;
+
fgorski 2016/08/10 16:00:09 nit: remove this space, as methods below are still
Pete Williamson 2016/08/10 21:38:00 Done.
void AddOrUpdateRequest(const SavePageRequest& request,
const UpdateCallback& callback) override;
// Remove requests by request ID. In case the |request_ids| is empty, the
@@ -34,6 +34,12 @@ class RequestQueueInMemoryStore : public RequestQueueStore {
// result will be true, but the count of deleted pages will be 0.
void RemoveRequestsByClientId(const std::vector<ClientId>& client_ids,
const RemoveCallback& callback) override;
+
fgorski 2016/08/10 16:00:09 nit: same here.
Pete Williamson 2016/08/10 21:38:00 Done.
+ // Set the state of associated requests to |new_state|.
+ void ChangeRequestsState(const std::vector<int64_t>& request_ids,
+ const SavePageRequest::RequestState new_state,
+ const UpdateCallback& callback) override;
+
void Reset(const ResetCallback& callback) override;
private:

Powered by Google App Engine
This is Rietveld 408576698