| 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 830d605e57819174e291103bb0f83ca8b3704ba9..9d4e5f06d18ae6f7acb9f63514a555fbd4b2fb04 100644
|
| --- a/components/offline_pages/background/request_coordinator.h
|
| +++ b/components/offline_pages/background/request_coordinator.h
|
| @@ -58,9 +58,18 @@ class RequestCoordinator : public KeyedService,
|
| // Callback to report when a request was available.
|
| typedef base::Callback<void(const SavePageRequest& request)>
|
| RequestPickedCallback;
|
| +
|
| // Callback to report when no request was available.
|
| typedef base::Callback<void(bool)> RequestNotPickedCallback;
|
|
|
| + // Callback specifying which request IDs were actually removed.
|
| + typedef base::Callback<void(const MultipleItemStatuses&)>
|
| + RemoveRequestsCallback;
|
| +
|
| + // Callback that receives the response for GetAllRequests.
|
| + typedef base::Callback<void(std::vector<std::unique_ptr<SavePageRequest>>)>
|
| + GetRequestsCallback;
|
| +
|
| RequestCoordinator(std::unique_ptr<OfflinerPolicy> policy,
|
| std::unique_ptr<OfflinerFactory> factory,
|
| std::unique_ptr<RequestQueue> queue,
|
| @@ -75,11 +84,6 @@ class RequestCoordinator : public KeyedService,
|
| 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, and cancels an in-progress prerender.
|
| void RemoveRequests(const std::vector<int64_t>& request_ids,
|
| @@ -92,10 +96,6 @@ class RequestCoordinator : public KeyedService,
|
| // Resume a list of previously paused requests, making them available.
|
| void ResumeRequests(const std::vector<int64_t>& request_ids);
|
|
|
| - // Callback that receives the response for GetAllRequests.
|
| - typedef base::Callback<void(std::vector<std::unique_ptr<SavePageRequest>>)>
|
| - GetRequestsCallback;
|
| -
|
| // Get all save page request items in the callback.
|
| void GetAllRequests(const GetRequestsCallback& callback);
|
|
|
| @@ -193,13 +193,10 @@ class RequestCoordinator : public KeyedService,
|
| void HandleRemovedRequestsAndCallback(
|
| const RemoveRequestsCallback& callback,
|
| BackgroundSavePageResult status,
|
| - const RequestQueue::UpdateMultipleRequestResults& results,
|
| - std::vector<std::unique_ptr<SavePageRequest>> requests);
|
| + std::unique_ptr<UpdateRequestsResult> result);
|
|
|
| - void HandleRemovedRequests(
|
| - BackgroundSavePageResult status,
|
| - const RequestQueue::UpdateMultipleRequestResults& results,
|
| - std::vector<std::unique_ptr<SavePageRequest>> requests);
|
| + void HandleRemovedRequests(BackgroundSavePageResult status,
|
| + std::unique_ptr<UpdateRequestsResult> result);
|
|
|
| // Start processing now if connected (but with conservative assumption
|
| // as to other device conditions).
|
|
|