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

Unified Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 1997473004: Snippets are enabled when search suggestions are enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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 | « chrome/browser/profiles/profile_manager.cc ('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 a5bac53c11f3fe8e0bd2034c6e06dcb037ef7eed..cdfd97db0ba5bc94cf413c0d730c7c9af262e32f 100644
--- a/components/ntp_snippets/ntp_snippets_service.h
+++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -64,6 +64,7 @@ class NTPSnippetsService : public KeyedService,
// the locale, so 'en_US' (English language with US locale) and 'en-GB_US'
// (British English person in the US) are not language codes.
NTPSnippetsService(
+ bool enabled,
PrefService* pref_service,
sync_driver::SyncService* sync_service,
suggestions::SuggestionsService* suggestions_service,
@@ -76,8 +77,6 @@ class NTPSnippetsService : public KeyedService,
static void RegisterProfilePrefs(PrefRegistrySimple* registry);
- void Init(bool enabled);
-
// Inherited from KeyedService.
void Shutdown() override;
@@ -163,11 +162,13 @@ class NTPSnippetsService : public KeyedService,
bool IsSyncStateIncompatible();
enum class State {
- NOT_INITED,
INITED,
SHUT_DOWN
} state_;
+ // When |enabled_| is true the service will fetch snippets from the server
+ // using |snippets_fetcher_|, load snippets from device storage, and schedule
+ // the |scheduler_|.
bool enabled_;
PrefService* pref_service_;
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698