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

Side by Side Diff: components/ntp_snippets/remote/persistent_scheduler.h

Issue 2794313002: [Remote suggestions] Prioritize wifi for soft fetches. (Closed)
Patch Set: Fix an error in rebase Created 3 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
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 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_PERSISTENT_SCHEDULER_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_PERSISTENT_SCHEDULER_H_
6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_PERSISTENT_SCHEDULER_H_ 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_PERSISTENT_SCHEDULER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 10
(...skipping 17 matching lines...) Expand all
28 // depending on network state. Any of the periods can be zero to indicate that 28 // depending on network state. Any of the periods can be zero to indicate that
29 // the corresponding task should not be scheduled. Returns whether the 29 // the corresponding task should not be scheduled. Returns whether the
30 // scheduling was successful. 30 // scheduling was successful.
31 virtual bool Schedule(base::TimeDelta period_wifi, 31 virtual bool Schedule(base::TimeDelta period_wifi,
32 base::TimeDelta period_fallback) = 0; 32 base::TimeDelta period_fallback) = 0;
33 33
34 // Cancel any scheduled tasks. Equivalent to Schedule(0, 0). Returns whether 34 // Cancel any scheduled tasks. Equivalent to Schedule(0, 0). Returns whether
35 // the scheduling was successful. 35 // the scheduling was successful.
36 virtual bool Unschedule() = 0; 36 virtual bool Unschedule() = 0;
37 37
38 // TODO(jkrcal): Get this information exposed in the platform-independent
39 // net::NetworkChangeNotifier and remove this function.
40 virtual bool IsOnUnmeteredConnection() = 0;
41
38 protected: 42 protected:
39 PersistentScheduler() = default; 43 PersistentScheduler() = default;
40 44
41 private: 45 private:
42 DISALLOW_COPY_AND_ASSIGN(PersistentScheduler); 46 DISALLOW_COPY_AND_ASSIGN(PersistentScheduler);
43 }; 47 };
44 48
45 } // namespace ntp_snippets 49 } // namespace ntp_snippets
46 50
47 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_PERSISTENT_SCHEDULER_H_ 51 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_PERSISTENT_SCHEDULER_H_
OLDNEW
« no previous file with comments | « components/ntp_snippets/pref_names.cc ('k') | components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698