Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_PICK_REQUEST_TASK_FACTORY_H_ | |
| 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_PICK_REQUEST_TASK_FACTORY_H_ | |
| 7 | |
| 8 #include "components/offline_pages/background/device_conditions.h" | |
|
fgorski
2016/11/09 17:58:07
nit: can this be forward declared?
Pete Williamson
2016/11/09 23:53:56
Done.
| |
| 9 #include "components/offline_pages/background/pick_request_task.h" | |
|
fgorski
2016/11/09 17:58:07
nit: can this be forward declared?
Pete Williamson
2016/11/09 23:53:56
Nope, needed for the callback types.
| |
| 10 #include "components/offline_pages/background/request_coordinator.h" | |
|
fgorski
2016/11/09 17:58:07
is this needed?
Pete Williamson
2016/11/09 23:53:56
Removed. (and then added in a few places that wer
| |
| 11 | |
| 12 namespace offline_pages { | |
| 13 | |
| 14 class OfflinerPolicy; | |
| 15 class RequestCoordinatorEventLogger; | |
| 16 class RequestNotifier; | |
| 17 class RequestQueue; | |
|
fgorski
2016/11/09 17:58:07
should this be store?
Pete Williamson
2016/11/09 23:53:56
Done.
| |
| 18 | |
| 19 class PickRequestTaskFactory { | |
| 20 public: | |
| 21 PickRequestTaskFactory(OfflinerPolicy* policy, | |
| 22 RequestNotifier* notifier, | |
| 23 RequestCoordinatorEventLogger* event_logger); | |
| 24 | |
| 25 ~PickRequestTaskFactory(); | |
| 26 | |
| 27 std::unique_ptr<PickRequestTask> CreatePickerTask( | |
| 28 RequestQueueStore* store, | |
| 29 const PickRequestTask::RequestPickedCallback& picked_callback, | |
| 30 const PickRequestTask::RequestNotPickedCallback& not_picked_callback, | |
| 31 DeviceConditions& conditions, | |
| 32 std::set<int64_t>& disabled_requests); | |
|
fgorski
2016/11/09 17:58:07
missing includes for set and int64_t
Pete Williamson
2016/11/09 23:53:55
Done.
| |
| 33 | |
| 34 private: | |
| 35 // Unowned pointer to the Policy | |
| 36 OfflinerPolicy* policy_; | |
| 37 // Unowned pointer to the notifier | |
| 38 RequestNotifier* notifier_; | |
| 39 // Unowned pointer to the EventLogger | |
| 40 RequestCoordinatorEventLogger* event_logger_; | |
| 41 }; | |
| 42 | |
| 43 } // namespace offline_pages | |
| 44 | |
| 45 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_PICK_REQUEST_TASK_FACTORY_H_ | |
| OLD | NEW |