Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: components/offline_pages/background/scheduler_stub.h

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_SCHEDULER_STUB_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_SCHEDULER_STUB_H_
7
8 #include "components/offline_pages/background/scheduler.h"
9
10 namespace offline_pages {
11
12 // Test class stubbing out the functionality of Scheduler.
13 // It is only used for test support.
14 class SchedulerStub : public Scheduler {
15 public:
16 SchedulerStub();
17 ~SchedulerStub() override;
18
19 void Schedule(const TriggerConditions& trigger_conditions) override;
20
21 void BackupSchedule(const TriggerConditions& trigger_conditions,
22 long delay_in_seconds) override;
23
24 // Unschedules the currently scheduled task, if any.
25 void Unschedule() override;
26
27 bool schedule_called() const { return schedule_called_; }
28
29 bool backup_schedule_called() const { return backup_schedule_called_; }
30
31 bool unschedule_called() const { return unschedule_called_; }
32
33 TriggerConditions const* conditions() const { return &conditions_; }
34
35 private:
36 bool schedule_called_;
37 bool backup_schedule_called_;
38 bool unschedule_called_;
39 long schedule_delay_;
40 TriggerConditions conditions_;
41 };
42
43 } // namespace offline_pages
44
45 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SCHEDULER_STUB_H_
OLDNEW
« no previous file with comments | « components/offline_pages/background/scheduler.h ('k') | components/offline_pages/background/scheduler_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698