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

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

Issue 1011813006: Make availability of hotword hardware known to hotword component extension. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/common/extensions/api/hotword_private.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/hotword_service_factory.cc
diff --git a/chrome/browser/search/hotword_service_factory.cc b/chrome/browser/search/hotword_service_factory.cc
index bc88d2bdffdede4e4c9a0561b6ac0f6d57fff8a0..bbc10b4f1a22d684fc8ae2709d6b1380db2982b6 100644
--- a/chrome/browser/search/hotword_service_factory.cc
+++ b/chrome/browser/search/hotword_service_factory.cc
@@ -17,7 +17,6 @@
#if defined(OS_CHROMEOS)
#include "chrome/common/chrome_version_info.h"
-#include "chromeos/audio/cras_audio_handler.h"
#endif
using content::BrowserContext;
@@ -53,15 +52,8 @@ bool HotwordServiceFactory::IsAlwaysOnAvailable() {
if ((channel == chrome::VersionInfo::CHANNEL_UNKNOWN ||
channel == chrome::VersionInfo::CHANNEL_CANARY ||
channel == chrome::VersionInfo::CHANNEL_DEV) &&
- chromeos::CrasAudioHandler::IsInitialized()) {
- chromeos::AudioDeviceList devices;
- chromeos::CrasAudioHandler::Get()->GetAudioDevices(&devices);
- for (size_t i = 0; i < devices.size(); ++i) {
- if (devices[i].type == chromeos::AUDIO_TYPE_AOKR) {
- DCHECK(devices[i].is_input);
- return true;
- }
- }
+ HotwordService::IsHotwordHardwareAvailable()) {
+ return true;
}
#endif
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/common/extensions/api/hotword_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698