diff options
author | amistry <amistry@chromium.org> | 2014-11-05 20:53:13 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-06 04:53:30 +0000 |
commit | 510ed8e880ae17f79a84c2ed3bc1a87300a83119 (patch) | |
tree | d80b707a98e31137f74740fec64c9ae11a036291 | |
parent | 14caff1993c280bd5979706f50d0e454ba3b9772 (diff) | |
download | chromium_src-510ed8e880ae17f79a84c2ed3bc1a87300a83119.zip chromium_src-510ed8e880ae17f79a84c2ed3bc1a87300a83119.tar.gz chromium_src-510ed8e880ae17f79a84c2ed3bc1a87300a83119.tar.bz2 |
Allow new hotwording to be enabled via a field trial.
BUG=397019
Review URL: https://codereview.chromium.org/704023002
Cr-Commit-Position: refs/heads/master@{#302963}
-rw-r--r-- | chrome/browser/search/hotword_service.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/search/hotword_service.cc b/chrome/browser/search/hotword_service.cc index 53e7303..40fd0b7 100644 --- a/chrome/browser/search/hotword_service.cc +++ b/chrome/browser/search/hotword_service.cc @@ -161,6 +161,7 @@ namespace hotword_internal { // Constants for the hotword field trial. const char kHotwordFieldTrialName[] = "VoiceTrigger"; const char kHotwordFieldTrialDisabledGroupName[] = "Disabled"; +const char kHotwordFieldTrialExperimentalGroupName[] = "Experimental"; // Old preference constant. const char kHotwordUnusablePrefName[] = "hotword.search_enabled"; // String passed to indicate the training state has changed. @@ -182,6 +183,13 @@ bool HotwordService::DoesHotwordSupportLanguage(Profile* profile) { // static bool HotwordService::IsExperimentalHotwordingEnabled() { + std::string group = base::FieldTrialList::FindFullName( + hotword_internal::kHotwordFieldTrialName); + if (!group.empty() && + group == hotword_internal::kHotwordFieldTrialExperimentalGroupName) { + return true; + } + CommandLine* command_line = CommandLine::ForCurrentProcess(); return command_line->HasSwitch(switches::kEnableExperimentalHotwording); } |