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

Unified Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 966323002: Re-order logic in StartPageService::HotwordEnabled(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/start_page_service.cc
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc
index 2b479c0e3bcdf87f69ac9df3ad7825e2bd68e5b5..86b78e511f6204ccc7dea3bef55e5a1225e7c3a1 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -445,9 +445,9 @@ bool StartPageService::HotwordEnabled() {
if (HotwordService::IsExperimentalHotwordingEnabled()) {
HotwordService* service = HotwordServiceFactory::GetForProfile(profile_);
return state_ != SPEECH_RECOGNITION_OFF &&
- HotwordServiceFactory::IsServiceAvailable(profile_) &&
service &&
- (service->IsSometimesOnEnabled() || service->IsAlwaysOnEnabled());
+ (service->IsSometimesOnEnabled() || service->IsAlwaysOnEnabled()) &&
+ HotwordServiceFactory::IsServiceAvailable(profile_);
calamity 2015/03/02 04:20:20 Why not service->IsServiceAvailable()?
Anand Mistry (off Chromium) 2015/03/02 05:43:30 No reason today. Done.
}
return HotwordServiceFactory::IsServiceAvailable(profile_) &&
profile_->GetPrefs()->GetBoolean(prefs::kHotwordSearchEnabled);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698