Chromium Code Reviews| Index: components/offline_pages/background/request_picker.h |
| diff --git a/components/offline_pages/background/request_picker.h b/components/offline_pages/background/request_picker.h |
| index 3062152ed57e2a5fc6775eb4ec927d365a6d4a1d..43667e7c8144aa37d994a56aed44dd2ab993757a 100644 |
| --- a/components/offline_pages/background/request_picker.h |
| +++ b/components/offline_pages/background/request_picker.h |
| @@ -20,7 +20,9 @@ typedef bool (RequestPicker::*RequestCompareFunction)( |
| class RequestPicker { |
| public: |
| - RequestPicker(RequestQueue* requestQueue, OfflinerPolicy* policy); |
| + RequestPicker(RequestQueue* requestQueue, |
| + OfflinerPolicy* policy, |
| + RequestCoordinator* coordinator); |
|
Pete Williamson
2016/08/16 23:40:46
This builds a circular dependency - RP depends on
romax
2016/08/17 20:07:59
Done.
|
| ~RequestPicker(); |
| @@ -63,10 +65,22 @@ class RequestPicker { |
| int CompareCreationTime(const SavePageRequest* left, |
| const SavePageRequest* right); |
| - // unowned pointer to the request queue. |
| + // Split all requests into expired ones and still valid ones. |
| + void SplitRequests(const std::vector<SavePageRequest>& requests, |
| + std::vector<SavePageRequest>& valid_requests, |
| + std::vector<SavePageRequest>& expired_requests); |
| + |
| + // Callback used after requests get expired. |
| + void OnRequestExpired( |
| + const RequestQueue::UpdateMultipleRequestResults& results, |
| + const std::vector<SavePageRequest>& requests); |
| + |
| + // Unowned pointer to the request queue. |
| RequestQueue* queue_; |
| - // unowned pointer to the policy object. |
| + // Unowned pointer to the policy object. |
| OfflinerPolicy* policy_; |
| + // Unowned pointer to the request coordinator. |
| + RequestCoordinator* coordinator_; |
| // Current conditions on the device |
| std::unique_ptr<DeviceConditions> current_conditions_; |
| // True if we prefer less-tried requests |