| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // Receives the result of update and delete requests to the request queue. | 170 // Receives the result of update and delete requests to the request queue. |
| 171 void UpdateRequestCallback(const ClientId& client_id, | 171 void UpdateRequestCallback(const ClientId& client_id, |
| 172 RequestQueue::UpdateRequestResult result); | 172 RequestQueue::UpdateRequestResult result); |
| 173 | 173 |
| 174 void UpdateMultipleRequestsCallback( | 174 void UpdateMultipleRequestsCallback( |
| 175 const RequestQueue::UpdateMultipleRequestResults& result, | 175 const RequestQueue::UpdateMultipleRequestResults& result, |
| 176 const std::vector<SavePageRequest>& requests); | 176 const std::vector<SavePageRequest>& requests); |
| 177 | 177 |
| 178 void HandleRemovedRequestsAndCallback( | 178 void HandleRemovedRequestsAndCallback( |
| 179 const RemoveRequestsCallback& callback, | 179 const RemoveRequestsCallback& callback, |
| 180 SavePageStatus status, |
| 180 const RequestQueue::UpdateMultipleRequestResults& results, | 181 const RequestQueue::UpdateMultipleRequestResults& results, |
| 181 const std::vector<SavePageRequest>& requests); | 182 const std::vector<SavePageRequest>& requests); |
| 182 | 183 |
| 183 void HandleRemovedRequests( | 184 void HandleRemovedRequests( |
| 185 SavePageStatus status, |
| 184 const RequestQueue::UpdateMultipleRequestResults& results, | 186 const RequestQueue::UpdateMultipleRequestResults& results, |
| 185 const std::vector<SavePageRequest>& requests); | 187 const std::vector<SavePageRequest>& requests); |
| 186 | 188 |
| 187 // Callback from the request picker when it has chosen our next request. | 189 // Callback from the request picker when it has chosen our next request. |
| 188 void RequestPicked(const SavePageRequest& request); | 190 void RequestPicked(const SavePageRequest& request); |
| 189 | 191 |
| 190 // Callback from the request picker when no more requests are in the queue. | 192 // Callback from the request picker when no more requests are in the queue. |
| 191 void RequestQueueEmpty(); | 193 void RequestQueueEmpty(); |
| 192 | 194 |
| 193 // Cancels an in progress pre-rendering, and updates state appropriately. | 195 // Cancels an in progress pre-rendering, and updates state appropriately. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 base::TimeDelta offliner_timeout_; | 258 base::TimeDelta offliner_timeout_; |
| 257 // Allows us to pass a weak pointer to callbacks. | 259 // Allows us to pass a weak pointer to callbacks. |
| 258 base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_; | 260 base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_; |
| 259 | 261 |
| 260 DISALLOW_COPY_AND_ASSIGN(RequestCoordinator); | 262 DISALLOW_COPY_AND_ASSIGN(RequestCoordinator); |
| 261 }; | 263 }; |
| 262 | 264 |
| 263 } // namespace offline_pages | 265 } // namespace offline_pages |
| 264 | 266 |
| 265 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ | 267 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ |
| OLD | NEW |