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

Side by Side Diff: components/ntp_snippets/ntp_snippets_scheduler.h

Issue 1699143002: [NTP Snippets] Schedule periodic fetching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippets_feature
Patch Set: fix bots Created 4 years, 9 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
« no previous file with comments | « components/ntp_snippets.gypi ('k') | components/ntp_snippets/ntp_snippets_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_NTP_SNIPPETS_NTP_SNIPPETS_SCHEDULER_H_
6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SCHEDULER_H_
7
8 #include "base/macros.h"
9
10 namespace ntp_snippets {
11
12 // Interface to schedule the periodic fetching of snippets.
13 class NTPSnippetsScheduler {
14 public:
15 // Schedule periodic fetching of snippets every |period_seconds|. The
16 // concrete implementation should call NTPSnippetsService::FetchSnippets once
17 // per period.
18 virtual bool Schedule(int period_seconds) = 0;
19
20 // Cancel the scheduled fetching task, if any.
21 virtual bool Unschedule() = 0;
22
23 protected:
24 NTPSnippetsScheduler() = default;
25
26 private:
27 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsScheduler);
28 };
29
30 } // namespace ntp_snippets
31
32 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SCHEDULER_H_
OLDNEW
« no previous file with comments | « components/ntp_snippets.gypi ('k') | components/ntp_snippets/ntp_snippets_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698