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

Side by Side Diff: chrome/browser/search/hotword_service.cc

Issue 981773003: Remove the flag to disable new hotwording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/search/hotword_service.h" 5 #include "chrome/browser/search/hotword_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/case_conversion.h" 10 #include "base/i18n/case_conversion.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 for (size_t i = 0; i < arraysize(kSupportedLocales); i++) { 289 for (size_t i = 0; i < arraysize(kSupportedLocales); i++) {
290 if (normalized_locale == kSupportedLocales[i]) 290 if (normalized_locale == kSupportedLocales[i])
291 return true; 291 return true;
292 } 292 }
293 return false; 293 return false;
294 } 294 }
295 295
296 // static 296 // static
297 bool HotwordService::IsExperimentalHotwordingEnabled() { 297 bool HotwordService::IsExperimentalHotwordingEnabled() {
298 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 298 return true;
299 return !command_line->HasSwitch(switches::kDisableExperimentalHotwording);
300 } 299 }
301 300
302 #if defined(OS_CHROMEOS) 301 #if defined(OS_CHROMEOS)
303 class HotwordService::HotwordUserSessionStateObserver 302 class HotwordService::HotwordUserSessionStateObserver
304 : public user_manager::UserManager::UserSessionStateObserver { 303 : public user_manager::UserManager::UserSessionStateObserver {
305 public: 304 public:
306 explicit HotwordUserSessionStateObserver(HotwordService* service) 305 explicit HotwordUserSessionStateObserver(HotwordService* service)
307 : service_(service) {} 306 : service_(service) {}
308 307
309 // Overridden from UserSessionStateObserver: 308 // Overridden from UserSessionStateObserver:
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 // Only support multiple profiles and profile switching in ChromeOS. 887 // Only support multiple profiles and profile switching in ChromeOS.
889 if (user_manager::UserManager::IsInitialized()) { 888 if (user_manager::UserManager::IsInitialized()) {
890 user_manager::User* user = 889 user_manager::User* user =
891 user_manager::UserManager::Get()->GetActiveUser(); 890 user_manager::UserManager::Get()->GetActiveUser();
892 if (user && user->is_profile_created()) 891 if (user && user->is_profile_created())
893 return profile_ == ProfileManager::GetActiveUserProfile(); 892 return profile_ == ProfileManager::GetActiveUserProfile();
894 } 893 }
895 #endif 894 #endif
896 return true; 895 return true;
897 } 896 }
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service.h ('k') | chrome/browser/search/hotword_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698