Commit db0d8ae5 authored by gogerald's avatar gogerald Committed by Commit Bot

Add a parameter to enable native UI

Bug: crbug.com/1144732
Change-Id: I02b0f55361cb4211b8862a62be4d841c15e2ad68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536054
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Auto-Submit: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827145}
parent bbc28269
...@@ -239,6 +239,12 @@ const FeatureEntry::FeatureVariation ...@@ -239,6 +239,12 @@ const FeatureEntry::FeatureVariation
{"(show one)", kAutofillUseMobileLabelDisambiguationShowOne, {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
base::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}}; base::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
const FeatureEntry::FeatureParam kDiscoverFeedInNtpEnableNativeUI[] = {
{kDiscoverFeedIsNativeUIEnabled, "true"}};
const FeatureEntry::FeatureVariation kDiscoverFeedInNtpVariations[] = {
{"Native UI", kDiscoverFeedInNtpEnableNativeUI,
base::size(kDiscoverFeedInNtpEnableNativeUI), nullptr}};
// To add a new entry, add to the end of kFeatureEntries. There are four // To add a new entry, add to the end of kFeatureEntries. There are four
// distinct types of entries: // distinct types of entries:
// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the // . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
...@@ -519,7 +525,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = { ...@@ -519,7 +525,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(kSafetyCheckIOS)}, FEATURE_VALUE_TYPE(kSafetyCheckIOS)},
{"new-content-suggestions-feed", flag_descriptions::kDiscoverFeedInNtpName, {"new-content-suggestions-feed", flag_descriptions::kDiscoverFeedInNtpName,
flag_descriptions::kDiscoverFeedInNtpDescription, flags_ui::kOsIos, flag_descriptions::kDiscoverFeedInNtpDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kDiscoverFeedInNtp)}, FEATURE_WITH_PARAMS_VALUE_TYPE(kDiscoverFeedInNtp,
kDiscoverFeedInNtpVariations,
"IOSDiscoverFeed")},
{"autofill-enable-card-nickname-upstream", {"autofill-enable-card-nickname-upstream",
flag_descriptions::kAutofillEnableCardNicknameUpstreamName, flag_descriptions::kAutofillEnableCardNicknameUpstreamName,
flag_descriptions::kAutofillEnableCardNicknameUpstreamDescription, flag_descriptions::kAutofillEnableCardNicknameUpstreamDescription,
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
// Use IsDiscoverFeedEnabled() instead of this constant directly. // Use IsDiscoverFeedEnabled() instead of this constant directly.
extern const base::Feature kDiscoverFeedInNtp; extern const base::Feature kDiscoverFeedInNtp;
// A parameter to indicate whether the native UI is enabled for the discover
// feed.
extern const char kDiscoverFeedIsNativeUIEnabled[];
// Whether the Discover feed is enabled instead of the Zine feed. // Whether the Discover feed is enabled instead of the Zine feed.
bool IsDiscoverFeedEnabled(); bool IsDiscoverFeedEnabled();
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
const base::Feature kDiscoverFeedInNtp{"DiscoverFeedInNtp", const base::Feature kDiscoverFeedInNtp{"DiscoverFeedInNtp",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
// A parameter to indicate whether the native UI is enabled for the discover
// feed.
const char kDiscoverFeedIsNativeUIEnabled[] = "DiscoverFeedIsNativeUIEnabled";
bool IsDiscoverFeedEnabled() { bool IsDiscoverFeedEnabled() {
return base::FeatureList::IsEnabled(kDiscoverFeedInNtp); return base::FeatureList::IsEnabled(kDiscoverFeedInNtp);
} }
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