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

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

Issue 1008833003: Enable always-on hotwording hardware check on unstable channels only. (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 | « 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/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..bc88d2bdffdede4e4c9a0561b6ac0f6d57fff8a0 100644
--- a/chrome/browser/search/hotword_service_factory.cc
+++ b/chrome/browser/search/hotword_service_factory.cc
@@ -16,6 +16,7 @@
#include "content/public/browser/browser_thread.h"
#if defined(OS_CHROMEOS)
+#include "chrome/common/chrome_version_info.h"
#include "chromeos/audio/cras_audio_handler.h"
#endif
@@ -47,11 +48,12 @@ bool HotwordServiceFactory::IsHotwordAllowed(BrowserContext* context) {
// static
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()) {
+ chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
+ 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) {
@@ -62,7 +64,6 @@ bool HotwordServiceFactory::IsAlwaysOnAvailable() {
}
}
#endif
-#endif // 0
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
return command_line->HasSwitch(switches::kEnableExperimentalHotwordHardware);
}
« 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