Index: chrome/browser/search/hotword_service.cc |
diff --git a/chrome/browser/search/hotword_service.cc b/chrome/browser/search/hotword_service.cc |
index dd60486669223d74f5bb5cc2b9048572a6faac8c..4688046c889f0dcdb275c142dff4cd7c38fffbe9 100644 |
--- a/chrome/browser/search/hotword_service.cc |
+++ b/chrome/browser/search/hotword_service.cc |
@@ -225,8 +225,6 @@ class HotwordNotificationDelegate : public NotificationDelegate { |
HotwordService::HOTWORD_AND_AUDIO_HISTORY; |
if (profile_->GetPrefs()->GetBoolean( |
prefs::kHotwordAudioLoggingEnabled)) { |
- // TODO(rlp): Make sure the Chrome Audio History pref is synced |
- // to the account-level Audio History setting from footprints. |
launch_mode = HotwordService::HOTWORD_ONLY; |
} |
@@ -343,7 +341,8 @@ HotwordService::HotwordService(Profile* profile) |
profile_->GetPrefs()->ClearPref(hotword_internal::kHotwordUnusablePrefName); |
} |
- audio_history_handler_.reset(new HotwordAudioHistoryHandler(profile_)); |
+ SetAudioHistoryHandler(new HotwordAudioHistoryHandler( |
+ profile_, base::MessageLoop::current()->task_runner())); |
if (HotwordServiceFactory::IsHotwordHardwareAvailable() && |
IsHotwordAllowed() && |
@@ -741,6 +740,7 @@ HotwordAudioHistoryHandler* HotwordService::GetAudioHistoryHandler() { |
void HotwordService::SetAudioHistoryHandler( |
HotwordAudioHistoryHandler* handler) { |
audio_history_handler_.reset(handler); |
+ audio_history_handler_->UpdateAudioHistoryState(); |
} |
void HotwordService::DisableHotwordPreferences() { |