Index: components/ntp_snippets/ntp_snippets_service.cc |
diff --git a/components/ntp_snippets/ntp_snippets_service.cc b/components/ntp_snippets/ntp_snippets_service.cc |
index fc3ff800a0df056db1dfd871d2462c917971c4a1..ca63138747052ae91e88db47245ea2083b293a85 100644 |
--- a/components/ntp_snippets/ntp_snippets_service.cc |
+++ b/components/ntp_snippets/ntp_snippets_service.cc |
@@ -237,6 +237,8 @@ NTPSnippetsService::~NTPSnippetsService() { |
// static |
void NTPSnippetsService::RegisterProfilePrefs(PrefRegistrySimple* registry) { |
registry->RegisterListPref(prefs::kSnippetHosts); |
+ |
+ NTPSnippetsStatusService::RegisterProfilePrefs(registry); |
} |
// Inherited from KeyedService. |
@@ -693,12 +695,13 @@ void NTPSnippetsService::FinishInitialization() { |
// Note: Initializing the status service will run the callback right away with |
// the current state. |
snippets_status_service_->Init(base::Bind( |
- &NTPSnippetsService::UpdateStateForStatus, base::Unretained(this))); |
+ &NTPSnippetsService::OnDisabledReasonChanged, base::Unretained(this))); |
NotifyNewSuggestions(); |
} |
-void NTPSnippetsService::UpdateStateForStatus(DisabledReason disabled_reason) { |
+void NTPSnippetsService::OnDisabledReasonChanged( |
+ DisabledReason disabled_reason) { |
FOR_EACH_OBSERVER(NTPSnippetsServiceObserver, observers_, |
NTPSnippetsServiceDisabledReasonChanged(disabled_reason)); |