Chromium Code Reviews| Index: components/offline_pages/background/request_coordinator.cc |
| diff --git a/components/offline_pages/background/request_coordinator.cc b/components/offline_pages/background/request_coordinator.cc |
| index d5e87d26a47a8fd93aa7af30aa2dacef1ad23837..b791a235a23ecd7a4520861fc9d81fcc73d6bf7a 100644 |
| --- a/components/offline_pages/background/request_coordinator.cc |
| +++ b/components/offline_pages/background/request_coordinator.cc |
| @@ -18,6 +18,13 @@ |
| namespace offline_pages { |
| +namespace { |
| +const Scheduler::TriggerConditions kUserRequestTriggerConditions( |
| + false /* require_power_connected */, |
| + 50 /* minimum_battery_percentage */, |
|
Pete Williamson
2016/06/22 20:49:11
25 might be better than 50 here.
It might also be
dougarnett
2016/06/22 21:52:17
Added to the TODO comment to consider lowering it
|
| + false /* require_unmetered_network */); |
| +} // namespace |
| + |
| RequestCoordinator::RequestCoordinator(std::unique_ptr<OfflinerPolicy> policy, |
| std::unique_ptr<OfflinerFactory> factory, |
| std::unique_ptr<RequestQueue> queue, |
| @@ -63,9 +70,8 @@ void RequestCoordinator::AddRequestResultCallback( |
| const SavePageRequest& request) { |
| // Inform the scheduler that we have an outstanding task. |
| - // TODO(petewil): Define proper TriggerConditions and set them. |
| - Scheduler::TriggerCondition conditions; |
| - scheduler_->Schedule(conditions); |
| + // TODO(petewil): Determine trigger conditions from policy. |
| + scheduler_->Schedule(kUserRequestTriggerConditions); |
| } |
| // Called in response to updating a request in the request queue. |