Chromium Code Reviews| 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 c757702b01bace4e290c725600225bb70b7e3e28..75bc3dcb866175044060ffd821088839fba73982 100644 |
| --- a/components/offline_pages/background/request_coordinator.h |
| +++ b/components/offline_pages/background/request_coordinator.h |
| @@ -50,6 +50,17 @@ class RequestCoordinator : public KeyedService { |
| bool SavePageLater( |
| const GURL& url, const ClientId& client_id, bool user_reqeusted); |
| + // Callback that receives the response for GetQueuedRequests. Client must |
| + // copy the result right away, it goes out of scope at the end of the |
| + // callback. |
| + typedef base::Callback<void(const std::vector<ClientId>&)> |
| + QueuedRequestCallback; |
| + |
| + // For a client namespace, get the client_id of all requests for that |
|
dougarnett
2016/08/03 04:27:19
for comment probably better "client_id" => "client
Pete Williamson
2016/08/03 20:13:44
Done.
|
| + // namespace. |
| + void GetQueuedRequests(const std::string& client_namespace, |
| + const QueuedRequestCallback& callback); |
| + |
| // Starts processing of one or more queued save page later requests. |
| // Returns whether processing was started and that caller should expect |
| // a callback. If processing was already active, returns false. |
| @@ -95,9 +106,18 @@ class RequestCoordinator : public KeyedService { |
| } |
| private: |
| + // Receives the results of a get from the request queue, and turns that into |
| + // ClientId objects for the caller of GetQueuedRequests. |
| + void GetQueuedRequestsCallback(const std::string& client_namespace, |
| + QueuedRequestCallback callback, |
|
fgorski
2016/08/03 03:13:15
const &
Pete Williamson
2016/08/03 20:13:44
Done.
|
| + RequestQueue::GetRequestsResult result, |
| + const std::vector<SavePageRequest>& requests); |
| + |
| + // Receives the result of add requests to the request queue. |
| void AddRequestResultCallback(RequestQueue::AddRequestResult result, |
| const SavePageRequest& request); |
| + // Receives the result of update and delete requests to the request queue. |
| void UpdateRequestCallback(RequestQueue::UpdateRequestResult result); |
| // Callback from the request picker when it has chosen our next request. |