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

Unified Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 1869323003: [NTP Snippets] Scheduler: Fetch on Wifi (without charging) only 6AM-10PM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippets_merge_controller
Patch Set: remove fudge 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/ntp_snippets/ntp_snippets_scheduler.h ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippets_service.h
diff --git a/components/ntp_snippets/ntp_snippets_service.h b/components/ntp_snippets/ntp_snippets_service.h
index 39e8dc8c8c052f1bf189278bcf188acf87fda569..4269f9413cfb2624f079f8407508ef81b3108df7 100644
--- a/components/ntp_snippets/ntp_snippets_service.h
+++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -79,6 +79,10 @@ class NTPSnippetsService : public KeyedService {
// suggestions from the suggestion service) and adds them to the current ones.
void FetchSnippetsFromHosts(const std::set<std::string>& hosts);
+ // (Re)schedules the periodic fetching of snippets. This is necessary because
+ // the schedule depends on the time of day
+ void RescheduleFetching();
+
// Deletes all currently stored snippets.
void ClearSnippets();
@@ -148,6 +152,8 @@ class NTPSnippetsService : public KeyedService {
void RemoveExpiredSnippets();
+ bool enabled_;
+
PrefService* pref_service_;
suggestions::SuggestionsService* suggestions_service_;
« no previous file with comments | « components/ntp_snippets/ntp_snippets_scheduler.h ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698