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

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

Issue 1008273003: Rename HotwordServiceFactory::IsHotwordHardwareAvailable() to IsAlwaysOnAvailable(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_factory.h" 5 #include "chrome/browser/search/hotword_service_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/search/hotword_service.h" 10 #include "chrome/browser/search/hotword_service.h"
(...skipping 28 matching lines...) Expand all
39 return hotword_service && hotword_service->IsServiceAvailable(); 39 return hotword_service && hotword_service->IsServiceAvailable();
40 } 40 }
41 41
42 // static 42 // static
43 bool HotwordServiceFactory::IsHotwordAllowed(BrowserContext* context) { 43 bool HotwordServiceFactory::IsHotwordAllowed(BrowserContext* context) {
44 HotwordService* hotword_service = GetForProfile(context); 44 HotwordService* hotword_service = GetForProfile(context);
45 return hotword_service && hotword_service->IsHotwordAllowed(); 45 return hotword_service && hotword_service->IsHotwordAllowed();
46 } 46 }
47 47
48 // static 48 // static
49 bool HotwordServiceFactory::IsHotwordHardwareAvailable() { 49 bool HotwordServiceFactory::IsAlwaysOnAvailable() {
50 // Temporarily disabling hotword hardware check for M42. Will be 50 // Temporarily disabling hotword hardware check for M42. Will be
51 // re-enabled for M43. 51 // re-enabled for M43.
52 #if 0 52 #if 0
53 #if defined(OS_CHROMEOS) 53 #if defined(OS_CHROMEOS)
54 if (chromeos::CrasAudioHandler::IsInitialized()) { 54 if (chromeos::CrasAudioHandler::IsInitialized()) {
55 chromeos::AudioDeviceList devices; 55 chromeos::AudioDeviceList devices;
56 chromeos::CrasAudioHandler::Get()->GetAudioDevices(&devices); 56 chromeos::CrasAudioHandler::Get()->GetAudioDevices(&devices);
57 for (size_t i = 0; i < devices.size(); ++i) { 57 for (size_t i = 0; i < devices.size(); ++i) {
58 if (devices[i].type == chromeos::AUDIO_TYPE_AOKR) { 58 if (devices[i].type == chromeos::AUDIO_TYPE_AOKR) {
59 DCHECK(devices[i].is_input); 59 DCHECK(devices[i].is_input);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 137 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
138 prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnNotificationSeen, 138 prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnNotificationSeen,
139 false, 139 false,
140 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 140 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
141 } 141 }
142 142
143 KeyedService* HotwordServiceFactory::BuildServiceInstanceFor( 143 KeyedService* HotwordServiceFactory::BuildServiceInstanceFor(
144 BrowserContext* context) const { 144 BrowserContext* context) const {
145 return new HotwordService(Profile::FromBrowserContext(context)); 145 return new HotwordService(Profile::FromBrowserContext(context));
146 } 146 }
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service_factory.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698