Commit b8c74bd5 authored by Muyuan Li's avatar Muyuan Li Committed by Commit Bot

Add feature to enable assistant based on locales.

BUG=b:65588340
BUG=779815
TEST=test via local chrome variation server.

Change-Id: Ieb791cab0b84bcf8e8525a11d085e20ad99128bb
Reviewed-on: https://chromium-review.googlesource.com/747764Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Muyuan Li <muyuanli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512998}
parent e129fd7e
......@@ -32,6 +32,10 @@ const char kTestCrosGaiaIdMigrationStarted[] = "started";
const base::Feature kVoiceInteractionFeature{"ChromeOSVoiceInteraction",
base::FEATURE_DISABLED_BY_DEFAULT};
// Controls whether enable assistant for locale.
const base::Feature kAssistantFeatureForLocale{
"ChromeOSAssistantForLocale", base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace
// Please keep the order of these switches synchronized with the header file
......@@ -584,6 +588,12 @@ bool IsCellularFirstDevice() {
}
bool IsVoiceInteractionLocalesSupported() {
// We use Chromium variations to control locales for which assistant should
// be enabled. But we still keep checking the previously hard-coded locales
// for compatibility.
if (base::FeatureList::IsEnabled(kAssistantFeatureForLocale))
return true;
// TODO(updowndota): Add DCHECK here to make sure the value never changes
// after all the use case for this method has been moved into user session.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment