Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_NTP_SNIPPETS_NTP_SNIPPETS_SCHEDULER_H_ | |
| 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SCHEDULER_H_ | |
| 7 | |
| 8 namespace ntp_snippets { | |
| 9 | |
| 10 // Interface to schedule the periodic fetching of snippets. | |
| 11 class NTPSnippetsScheduler { | |
| 12 public: | |
| 13 // Schedule periodic fetching of snippets every |period_seconds|. The | |
| 14 // concrete implementation should call NTPSnippetsService::FetchSnippets once | |
| 15 // per period. | |
| 16 virtual bool Schedule(int period_seconds) = 0; | |
| 17 | |
| 18 // Cancel the scheduled fetching task, if any. | |
| 19 virtual bool Unschedule() = 0; | |
|
noyau (Ping after 24h)
2016/02/22 15:02:31
Add DISALLOW_COPY_AND_ASSIGN()
Marc Treib
2016/02/22 17:13:08
Done. I also had to add a default constructor :-/
| |
| 20 }; | |
| 21 | |
| 22 } // namespace ntp_snippets | |
| 23 | |
| 24 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SCHEDULER_H_ | |
| OLD | NEW |