[Autofill] Parameterizes flag for mobile label experiment.
Bug: 957426
Change-Id: I15acd48fab75d670ff74c8855697db201119d5c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1623126
Commit-Queue: Caitlin Fischer <[email protected]>
Reviewed-by: Fabio Tirelo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#663046}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 61529f28..1e0eab0 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -953,6 +953,26 @@
{"SurfaceLayer", kVizHitTestSurfaceLayerEnabled,
base::size(kVizHitTestSurfaceLayerEnabled), nullptr}};
+#if defined(OS_ANDROID)
+const FeatureEntry::FeatureParam
+ kAutofillUseMobileLabelDisambiguationShowAll[] = {
+ {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
+ autofill::features::
+ kAutofillUseMobileLabelDisambiguationParameterShowAll}};
+const FeatureEntry::FeatureParam
+ kAutofillUseMobileLabelDisambiguationShowOne[] = {
+ {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
+ autofill::features::
+ kAutofillUseMobileLabelDisambiguationParameterShowOne}};
+
+const FeatureEntry::FeatureVariation
+ kAutofillUseMobileLabelDisambiguationVariations[] = {
+ {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
+ base::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
+ {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
+ base::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
+#endif // defined(OS_ANDROID)
+
// RECORDING USER METRICS FOR FLAGS:
// -----------------------------------------------------------------------------
// The first line of the entry is the internal name.
@@ -962,7 +982,7 @@
// . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE
// macro for this type supplying the command line to the macro.
// . MULTI_VALUE: a list of choices, the first of which should correspond to a
-// deactivated state for this lab (i.e. no command line option). To specify
+// deactivated state for this lab (i.e. no command line option). To specify
// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
// array of choices.
// See the documentation of FeatureEntry for details on the fields.
@@ -970,10 +990,10 @@
// Usage of about:flags is logged on startup via the "Launch.FlagsAtStartup"
// UMA histogram. This histogram shows the number of startups with a given flag
// enabled. If you'd like to see user counts instead, make sure to switch to
-// to "count users" view on the dashboard. When adding new entries, the enum
+// "count users" view on the dashboard. When adding new entries, the enum
// "LoginCustomFlags" must be updated in histograms/enums.xml. See note in
-// enums.xml and don't forget to run AboutFlagsHistogramTest unit test
-// to calculate and verify checksum.
+// enums.xml and don't forget to run AboutFlagsHistogramTest unit test to
+// calculate and verify checksum.
//
// When adding a new choice, add it to the end of the list.
const FeatureEntry kFeatureEntries[] = {
@@ -1901,9 +1921,9 @@
{"set-market-url-for-testing",
flag_descriptions::kSetMarketUrlForTestingName,
flag_descriptions::kSetMarketUrlForTestingDescription, kOsAndroid,
- SINGLE_VALUE_TYPE_AND_VALUE(
- switches::kMarketUrlForTesting,
- "https://play.google.com/store/apps/details?id=com.android.chrome")},
+ SINGLE_VALUE_TYPE_AND_VALUE(switches::kMarketUrlForTesting,
+ "https://play.google.com/store/apps/"
+ "details?id=com.android.chrome")},
#endif // OS_ANDROID
{"enforce-tls13-downgrade", flag_descriptions::kEnforceTLS13DowngradeName,
flag_descriptions::kEnforceTLS13DowngradeDescription, kOsAll,
@@ -2353,8 +2373,8 @@
kOsAll,
FEATURE_VALUE_TYPE(omnibox::kSpeculativeServiceWorkerStartOnQueryInput)},
- // NOTE: This feature is generic and marked kOsAll but is used only in CrOS
- // for AndroidMessagesIntegration feature.
+ // NOTE: This feature is generic and marked kOsAll but is used only in
+ // CrOS for AndroidMessagesIntegration feature.
{"enable-service-worker-long-running-message",
flag_descriptions::kServiceWorkerLongRunningMessageName,
flag_descriptions::kServiceWorkerLongRunningMessageDescription, kOsAll,
@@ -3697,8 +3717,10 @@
flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
kOsAndroid,
- FEATURE_VALUE_TYPE(
- autofill::features::kAutofillUseMobileLabelDisambiguation)},
+ FEATURE_WITH_PARAMS_VALUE_TYPE(
+ autofill::features::kAutofillUseMobileLabelDisambiguation,
+ kAutofillUseMobileLabelDisambiguationVariations,
+ "AutofillUseMobileLabelDisambiguation")},
#endif // defined(OS_ANDROID)
{"autofill-prune-suggestions",