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

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: 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
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 f456c641d00e988dba22bc33422eb1a4251e419f..5686eb588d5cc1a6559460a33d5c42df2a46f97e 100644
--- a/chrome/browser/search/hotword_service_factory.cc
+++ b/chrome/browser/search/hotword_service_factory.cc
@@ -15,10 +15,6 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
-#if defined(OS_CHROMEOS)
-#include "chromeos/audio/cras_audio_handler.h"
-#endif
-
using content::BrowserContext;
using content::BrowserThread;
@@ -50,18 +46,8 @@ bool HotwordServiceFactory::IsAlwaysOnAvailable() {
// Temporarily disabling hotword hardware check for M42. Will be
// re-enabled for M43.
#if 0
-#if defined(OS_CHROMEOS)
- if (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;
- }
- }
- }
-#endif
+ if (HotwordService::IsHotwordHardwareAvailable())
+ return true;
#endif // 0
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
return command_line->HasSwitch(switches::kEnableExperimentalHotwordHardware);

Powered by Google App Engine
This is Rietveld 408576698