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 #include "components/offline_pages/background/scheduler_stub.h" | 5 #include "components/offline_pages/core/background/scheduler_stub.h" |
6 | 6 |
7 namespace offline_pages { | 7 namespace offline_pages { |
8 | 8 |
9 SchedulerStub::SchedulerStub() | 9 SchedulerStub::SchedulerStub() |
10 : schedule_called_(false), | 10 : schedule_called_(false), |
11 backup_schedule_called_(false), | 11 backup_schedule_called_(false), |
12 unschedule_called_(false), | 12 unschedule_called_(false), |
13 schedule_delay_(0L), | 13 schedule_delay_(0L), |
14 conditions_(false, 0, false) {} | 14 conditions_(false, 0, false) {} |
15 | 15 |
16 SchedulerStub::~SchedulerStub() {} | 16 SchedulerStub::~SchedulerStub() {} |
17 | 17 |
18 void SchedulerStub::Schedule(const TriggerConditions& trigger_conditions) { | 18 void SchedulerStub::Schedule(const TriggerConditions& trigger_conditions) { |
19 schedule_called_ = true; | 19 schedule_called_ = true; |
20 conditions_ = trigger_conditions; | 20 conditions_ = trigger_conditions; |
21 } | 21 } |
22 | 22 |
23 void SchedulerStub::BackupSchedule(const TriggerConditions& trigger_conditions, | 23 void SchedulerStub::BackupSchedule(const TriggerConditions& trigger_conditions, |
24 long delay_in_seconds) { | 24 long delay_in_seconds) { |
25 backup_schedule_called_ = true; | 25 backup_schedule_called_ = true; |
26 schedule_delay_ = delay_in_seconds; | 26 schedule_delay_ = delay_in_seconds; |
27 conditions_ = trigger_conditions; | 27 conditions_ = trigger_conditions; |
28 } | 28 } |
29 | 29 |
30 void SchedulerStub::Unschedule() { | 30 void SchedulerStub::Unschedule() { |
31 unschedule_called_ = true; | 31 unschedule_called_ = true; |
32 } | 32 } |
33 | 33 |
34 } // namespace offline_pages | 34 } // namespace offline_pages |
OLD | NEW |