Chromium Code Reviews| Index: components/ntp_snippets/ntp_snippets_scheduler.h |
| diff --git a/components/ntp_snippets/ntp_snippets_scheduler.h b/components/ntp_snippets/ntp_snippets_scheduler.h |
| index c374409c0b0b96b47d566caa38536b358e464e85..df6fe04c2aca81c15f0ab9a939fbb54c10c586e0 100644 |
| --- a/components/ntp_snippets/ntp_snippets_scheduler.h |
| +++ b/components/ntp_snippets/ntp_snippets_scheduler.h |
| @@ -14,13 +14,18 @@ namespace ntp_snippets { |
| class NTPSnippetsScheduler { |
| public: |
| // Schedule periodic fetching of snippets, with different period depending on |
| - // network and charging state. The concrete implementation should call |
| - // NTPSnippetsService::FetchSnippets once per period. |
| + // network and charging state, and also set up a delay after which the periods |
| + // may change. The concrete implementation should call |
| + // NTPSnippetsService::FetchSnippets once per period, and |
| + // NTPSnippetsService::RescheduleFetching after |reschedule_delay|. |
| + // Any of the TimeDeltas can be zero to indicate that the corresponding task |
| + // should not be scheduled. |
| virtual bool Schedule(base::TimeDelta period_wifi_charging, |
| base::TimeDelta period_wifi, |
| - base::TimeDelta period_fallback) = 0; |
| + base::TimeDelta period_fallback, |
| + base::TimeDelta reschedule_delay) = 0; |
|
Bernhard Bauer
2016/04/18 08:03:00
Would it make more sense to pass this as an absolu
Marc Treib
2016/04/19 11:32:13
Done.
|
| - // Cancel the scheduled fetching task, if any. |
| + // Cancel any scheduled tasks. |
| virtual bool Unschedule() = 0; |
| protected: |