Chromium Code Reviews| 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..3164a108209c160633d5f6c779e78dc8cfba0c99 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; |
| @@ -162,12 +161,12 @@ class NTPSnippetsService : public KeyedService, |
| // initializing and the sync state is not known. |
| bool IsSyncStateIncompatible(); |
| - enum class State { |
|
dgn
2016/05/24 16:38:35
treib@ is adding a LOADED state, and I'm adding a
Marc Treib
2016/05/24 16:55:24
+1 :)
Michael van Ouwerkerk
2016/05/24 16:58:09
Done.
|
| - NOT_INITED, |
| - INITED, |
| - SHUT_DOWN |
| - } state_; |
| + // Whether Shutdown has been called. |
| + bool shutdown_; |
| + // 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_; |