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

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

Issue 631913004: Open the launcher when hotword is triggered in always-on mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hotword-google-com-ntp
Patch Set: Fix android build Created 6 years, 2 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/search/hotword_service.h ('k') | chrome/browser/ui/app_list/app_list_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/hotword_service.cc
diff --git a/chrome/browser/search/hotword_service.cc b/chrome/browser/search/hotword_service.cc
index dec32729a9423fcca60ac1fef1381dfd695af354..c8bf7052843e9341eb97979ae99b4535468377eb 100644
--- a/chrome/browser/search/hotword_service.cc
+++ b/chrome/browser/search/hotword_service.cc
@@ -438,6 +438,12 @@ bool HotwordService::IsOptedIntoAudioLogging() {
profile_->GetPrefs()->GetBoolean(prefs::kHotwordAudioLoggingEnabled);
}
+bool HotwordService::IsAlwaysOnEnabled() {
+ return
+ profile_->GetPrefs()->HasPrefPath(prefs::kHotwordAlwaysOnSearchEnabled) &&
+ profile_->GetPrefs()->GetBoolean(prefs::kHotwordAlwaysOnSearchEnabled);
+}
+
void HotwordService::EnableHotwordExtension(
ExtensionService* extension_service) {
if (extension_service)
@@ -501,6 +507,9 @@ void HotwordService::StopHotwordSession(HotwordClient* client) {
if (!IsServiceAvailable())
return;
+ // Do nothing if there's no client.
+ if (!client_)
+ return;
DCHECK(client_ == client);
client_ = NULL;
« no previous file with comments | « chrome/browser/search/hotword_service.h ('k') | chrome/browser/ui/app_list/app_list_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698