Adds command-line flags to enable/disable autofill credit card popup experiment.
BUG=664367
Review-Url: https://codereview.chromium.org/2584713002
Cr-Commit-Position: refs/heads/master@{#439222}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 21f2f41..71052d3 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -630,6 +630,37 @@
{"Simple load", kNoStatePrefetchSimpleLoad,
arraysize(kNoStatePrefetchSimpleLoad), nullptr}};
+#if defined(OS_ANDROID)
+const FeatureEntry::FeatureParam
+kAutofillCreditCardPopupLayoutFeatureVariationIconAtStart[] = {
+ {"is_credit_card_icon_at_start", "true"}};
+
+const FeatureEntry::FeatureParam
+kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight[] = {
+ {"dropdown_item_height", "56"}};
+
+const FeatureEntry::FeatureParam
+kAutofillCreditCardPopupLayoutFeatureVariationExpanded[] = {
+ {"is_credit_card_icon_at_start", "true"},
+ {"dropdown_item_height", "56"}};
+
+const FeatureEntry::FeatureVariation
+kAutofillCreditCardPopupLayoutFeatureVariations[] = {
+ {"Display credit card icon at start",
+ kAutofillCreditCardPopupLayoutFeatureVariationIconAtStart,
+ arraysize(kAutofillCreditCardPopupLayoutFeatureVariationIconAtStart),
+ nullptr},
+ {"Increase dropdown item height",
+ kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight,
+ arraysize(
+ kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight),
+ nullptr},
+ {"Display credit card icon at start and increase dropdown item height",
+ kAutofillCreditCardPopupLayoutFeatureVariationExpanded,
+ arraysize(kAutofillCreditCardPopupLayoutFeatureVariationExpanded),
+ nullptr}};
+#endif // OS_ANDROID
+
// RECORDING USER METRICS FOR FLAGS:
// -----------------------------------------------------------------------------
// The first line of the entry is the internal name.
@@ -2103,6 +2134,17 @@
FEATURE_VALUE_TYPE(features::kCrosCompUpdates)},
#endif
+#if defined(OS_ANDROID)
+ {"enable-expanded-autofill-credit-card-popup",
+ IDS_FLAGS_ENABLE_EXPANDED_AUTOFILL_CREDIT_CARD_POPUP_LAYOUT,
+ IDS_FLAGS_ENABLE_EXPANDED_AUTOFILL_CREDIT_CARD_POPUP_LAYOUT_DESCRIPTION,
+ kOsAndroid,
+ FEATURE_WITH_VARIATIONS_VALUE_TYPE(
+ autofill::kAutofillCreditCardPopupLayout,
+ kAutofillCreditCardPopupLayoutFeatureVariations,
+ "AutofillCreditCardPopupLayout")},
+#endif // OS_ANDROID
+
// NOTE: Adding new command-line switches requires adding corresponding
// entries to enum "LoginCustomFlags" in histograms.xml. See note in
// histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.