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

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

Issue 1922533003: Defines initial inner circle of interfaces for background offlining. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RequestCoordinator now extends KeyedService and also now has empty ctor Created 4 years, 8 months 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_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_SCHEDULER_H_
7
8 namespace offline_pages {
9
10 // Interface of a class responsible for scheduling a task to initiate
11 // processing of background offlining requests upon select system conditions
12 // (such as having a network connection).
13 class Scheduler {
14 public:
15 // Defines a set of system conditions to trigger background processing.
16 struct TriggerCondition {
17 // TODO(dougarnett): define network, battery, power conditions.
18 };
19
20 virtual ~Scheduler() {}
21
22 // Ensures that the system has a task scheduled for |trigger_conditions|.
23 // This may overwrite any previous scheduled task with a new one for
24 // these conditions.
25 virtual void EnsureScheduled(const TriggerCondition& trigger_condition) = 0;
26
27 // Clears the currently scheduled task, if any.
28 virtual void ClearScheduled() = 0;
29 };
30
31 } // namespace offline_pages
32
33 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698