Chromium Code Reviews| 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 d4a9d3527a3a16e716d87e4e3b0f7435e1a38540..3c67037d086091720f966c10786573273e05fac3 100644 |
| --- a/components/offline_pages/background/request_queue_store.h |
| +++ b/components/offline_pages/background/request_queue_store.h |
| @@ -9,12 +9,11 @@ |
| #include <vector> |
| #include "base/callback.h" |
| +#include "components/offline_pages/background/save_page_request.h" |
| #include "components/offline_pages/offline_page_item.h" |
| namespace offline_pages { |
| -class SavePageRequest; |
| - |
| // Interface for classes storing save page requests. |
| class RequestQueueStore { |
| public: |
| @@ -23,6 +22,8 @@ class RequestQueueStore { |
| UPDATED, // Request was updated successfully. |
| FAILED, // Add or update attempt failed. |
| }; |
| + // TODO(fgorski): What if no items were updated? Maybe this should work more |
|
Dmitry Titov
2016/08/11 04:25:54
I think this is TODO(petewil) based on changing Ch
Pete Williamson
2016/08/12 00:06:46
Done.
|
| + // like DeleteCallback. |
| typedef base::Callback<void( |
| bool /* success */, |
| @@ -61,6 +62,13 @@ class RequestQueueStore { |
| virtual void RemoveRequestsByClientId(const std::vector<ClientId>& client_ids, |
| const RemoveCallback& callback) = 0; |
| + // Asynchronously changes the state of requests from the store using their |
| + // request id. |
| + virtual void ChangeRequestsState( |
| + const std::vector<int64_t>& request_ids, |
| + const SavePageRequest::RequestState new_state, |
| + const UpdateCallback& callback) = 0; |
| + |
| // Resets the store. |
| virtual void Reset(const ResetCallback& callback) = 0; |
| }; |