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

Unified Diff: chrome/browser/search/hotword_service.cc

Issue 800523002: [Hotword] Sync Audio History pref every 24 hours, when opening chrome://settings and . . . (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch param order Created 6 years 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: 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() {

Powered by Google App Engine
This is Rietveld 408576698