Commit a34fd068 authored by wutao's avatar wutao Committed by Commit Bot

ambient: Restrict flag visibility

Restrict the ambient mode flag to only Chromium builds and the Canary/Dev
channels.

Bug: b/148692733
Test: manual
Change-Id: I2554d6d1d07b57eafc079722e188cf079031d3ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2361284
Commit-Queue: Tao Wu <wutao@chromium.org>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799329}
parent ee28358f
...@@ -2183,6 +2183,8 @@ const FeatureEntry::FeatureVariation kPasswordChangeFeatureVariations[] = { ...@@ -2183,6 +2183,8 @@ const FeatureEntry::FeatureVariation kPasswordChangeFeatureVariations[] = {
constexpr char kAssistantBetterOnboardingInternalName[] = constexpr char kAssistantBetterOnboardingInternalName[] =
"enable-assistant-better-onboarding"; "enable-assistant-better-onboarding";
constexpr char kAssistantTimersV2InternalName[] = "enable-assistant-timers-v2"; constexpr char kAssistantTimersV2InternalName[] = "enable-assistant-timers-v2";
constexpr char kAmbientModeInternalName[] = "enable-ambient-mode";
#endif // OS_CHROMEOS #endif // OS_CHROMEOS
// RECORDING USER METRICS FOR FLAGS: // RECORDING USER METRICS FOR FLAGS:
...@@ -5909,7 +5911,7 @@ const FeatureEntry kFeatureEntries[] = { ...@@ -5909,7 +5911,7 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_VALUE_TYPE(switches::kDoubleBufferCompositing)}, SINGLE_VALUE_TYPE(switches::kDoubleBufferCompositing)},
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
{"enable-ambient-mode", flag_descriptions::kEnableAmbientModeName, {kAmbientModeInternalName, flag_descriptions::kEnableAmbientModeName,
flag_descriptions::kEnableAmbientModeDescription, kOsCrOS, flag_descriptions::kEnableAmbientModeDescription, kOsCrOS,
FEATURE_VALUE_TYPE(chromeos::features::kAmbientModeFeature)}, FEATURE_VALUE_TYPE(chromeos::features::kAmbientModeFeature)},
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
...@@ -6354,6 +6356,14 @@ bool SkipConditionalFeatureEntry(const flags_ui::FlagsStorage* storage, ...@@ -6354,6 +6356,14 @@ bool SkipConditionalFeatureEntry(const flags_ui::FlagsStorage* storage,
!strcmp(kAssistantTimersV2InternalName, entry.internal_name)) { !strcmp(kAssistantTimersV2InternalName, entry.internal_name)) {
return !base::FeatureList::IsEnabled(features::kTeamfoodFlags); return !base::FeatureList::IsEnabled(features::kTeamfoodFlags);
} }
// enable-ambient-mode is only available for Unknown/Canary/Dev channels.
if (!strcmp(kAmbientModeInternalName, entry.internal_name) &&
channel != version_info::Channel::DEV &&
channel != version_info::Channel::CANARY &&
channel != version_info::Channel::UNKNOWN) {
return true;
}
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
// data-reduction-proxy-lo-fi and enable-data-reduction-proxy-lite-page // data-reduction-proxy-lo-fi and enable-data-reduction-proxy-lite-page
......
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