Commit 15a1f1e6 authored by Tommy Martino's avatar Tommy Martino Committed by Commit Bot

[Autofill Views] Turning two-line layout on-by-default

Change-Id: I3e13df1bb2c3a330ff535321fbad525f9755cf03
Bug: 870342
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529406
Auto-Submit: Tommy Martino <tmartino@chromium.org>
Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
Reviewed-by: default avatarFabio Tirelo <ftirelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644152}
parent d06e9f38
...@@ -1011,26 +1011,6 @@ const FeatureEntry::FeatureVariation kResamplingInputEventsFeatureVariations[] = ...@@ -1011,26 +1011,6 @@ const FeatureEntry::FeatureVariation kResamplingInputEventsFeatureVariations[] =
{"kalman", kResamplingInputEventsKalmanEnabled, {"kalman", kResamplingInputEventsKalmanEnabled,
base::size(kResamplingInputEventsKalmanEnabled), nullptr}}; base::size(kResamplingInputEventsKalmanEnabled), nullptr}};
#if !defined(OS_ANDROID)
const FeatureEntry::FeatureParam kAutofillDropdownLayoutLeadingIcon[] = {
{autofill::kAutofillDropdownLayoutParameterName,
autofill::kAutofillDropdownLayoutParameterLeadingIcon}};
const FeatureEntry::FeatureParam kAutofillDropdownLayoutTrailingIcon[] = {
{autofill::kAutofillDropdownLayoutParameterName,
autofill::kAutofillDropdownLayoutParameterTrailingIcon}};
const FeatureEntry::FeatureParam kAutofillDropdownLayoutTwoLinesLeadingIcon[] =
{{autofill::kAutofillDropdownLayoutParameterName,
autofill::kAutofillDropdownLayoutParameterTwoLinesLeadingIcon}};
const FeatureEntry::FeatureVariation kAutofillDropdownLayoutVariations[] = {
{"(leading icon)", kAutofillDropdownLayoutLeadingIcon,
base::size(kAutofillDropdownLayoutLeadingIcon), nullptr},
{"(trailing icon)", kAutofillDropdownLayoutTrailingIcon,
base::size(kAutofillDropdownLayoutLeadingIcon), nullptr},
{"(two line leading icon)", kAutofillDropdownLayoutTwoLinesLeadingIcon,
base::size(kAutofillDropdownLayoutTwoLinesLeadingIcon), nullptr}};
#endif // !defined(OS_ANDROID)
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
const FeatureEntry::FeatureParam kBottomOfflineIndicatorEnabled[] = { const FeatureEntry::FeatureParam kBottomOfflineIndicatorEnabled[] = {
{"bottom_offline_indicator", "true"}}; {"bottom_offline_indicator", "true"}};
...@@ -3668,9 +3648,7 @@ const FeatureEntry kFeatureEntries[] = { ...@@ -3668,9 +3648,7 @@ const FeatureEntry kFeatureEntries[] = {
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
{"autofill-dropdown-layout", flag_descriptions::kAutofillDropdownLayoutName, {"autofill-dropdown-layout", flag_descriptions::kAutofillDropdownLayoutName,
flag_descriptions::kAutofillDropdownLayoutDescription, kOsDesktop, flag_descriptions::kAutofillDropdownLayoutDescription, kOsDesktop,
FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::kAutofillDropdownLayoutExperiment, FEATURE_VALUE_TYPE(autofill::kAutofillDropdownLayoutExperiment)},
kAutofillDropdownLayoutVariations,
"AutofillDropdownLayout")},
#endif // OS_ANDROID #endif // OS_ANDROID
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
......
...@@ -32,12 +32,7 @@ namespace autofill { ...@@ -32,12 +32,7 @@ namespace autofill {
#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
const base::Feature kAutofillDropdownLayoutExperiment{ const base::Feature kAutofillDropdownLayoutExperiment{
"AutofillDropdownLayout", base::FEATURE_DISABLED_BY_DEFAULT}; "AutofillDropdownLayout", base::FEATURE_ENABLED_BY_DEFAULT};
const char kAutofillDropdownLayoutParameterName[] = "variant";
const char kAutofillDropdownLayoutParameterLeadingIcon[] = "leading-icon";
const char kAutofillDropdownLayoutParameterTrailingIcon[] = "trailing-icon";
const char kAutofillDropdownLayoutParameterTwoLinesLeadingIcon[] =
"two-lines-leading-icon";
#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) #endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
bool IsCreditCardUploadEnabled(const PrefService* pref_service, bool IsCreditCardUploadEnabled(const PrefService* pref_service,
...@@ -180,24 +175,7 @@ ForcedPopupLayoutState GetForcedPopupLayoutState() { ...@@ -180,24 +175,7 @@ ForcedPopupLayoutState GetForcedPopupLayoutState() {
if (!base::FeatureList::IsEnabled( if (!base::FeatureList::IsEnabled(
autofill::kAutofillDropdownLayoutExperiment)) autofill::kAutofillDropdownLayoutExperiment))
return ForcedPopupLayoutState::kDefault; return ForcedPopupLayoutState::kDefault;
return ForcedPopupLayoutState::kTwoLinesLeadingIcon;
std::string param = base::GetFieldTrialParamValueByFeature(
kAutofillDropdownLayoutExperiment, kAutofillDropdownLayoutParameterName);
if (param == kAutofillDropdownLayoutParameterLeadingIcon) {
return ForcedPopupLayoutState::kLeadingIcon;
} else if (param == kAutofillDropdownLayoutParameterTrailingIcon) {
return ForcedPopupLayoutState::kTrailingIcon;
} else if (param ==
autofill::kAutofillDropdownLayoutParameterTwoLinesLeadingIcon) {
return ForcedPopupLayoutState::kTwoLinesLeadingIcon;
} else if (param.empty()) {
return ForcedPopupLayoutState::kDefault;
}
// Unknown parameter value.
NOTREACHED();
return ForcedPopupLayoutState::kDefault;
} }
#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) #endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
......
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