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

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: rebase 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
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 d6ab94c7f476981938ea99aa637bbf7dcdba7623..56c73876cc97110d609330b4332f69a5ab5ff9a5 100644
--- a/components/ntp_snippets/ntp_snippets_service.h
+++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -80,6 +80,10 @@ class NTPSnippetsService : public KeyedService {
// a snippet was discarded.
bool DiscardSnippet(const GURL& url);
+ // (Re)schedules the periodic fetching of snippets. This is necessary because
+ // the schedule depends on the time of day
+ void RescheduleFetching();
+
// Observer accessors.
void AddObserver(NTPSnippetsServiceObserver* observer);
void RemoveObserver(NTPSnippetsServiceObserver* observer);
@@ -132,6 +136,8 @@ class NTPSnippetsService : public KeyedService {
void RemoveExpiredSnippets();
+ bool enabled_;
+
PrefService* pref_service_;
suggestions::SuggestionsService* suggestions_service_;

Powered by Google App Engine
This is Rietveld 408576698