| Index: components/autofill/core/browser/personal_data_manager.cc
|
| diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
|
| index 61182febbd91e7487a8f8e661b2a8ed953d80866..b34eefa817b00a7b1189d46a58d0aa51bb660b44 100644
|
| --- a/components/autofill/core/browser/personal_data_manager.cc
|
| +++ b/components/autofill/core/browser/personal_data_manager.cc
|
| @@ -1633,8 +1633,27 @@ std::vector<Suggestion> PersonalDataManager::GetSuggestionsForCards(
|
| // cardholder name. The label should never repeat the value.
|
| if (type.GetStorableType() == CREDIT_CARD_NUMBER) {
|
| suggestion->value = credit_card->TypeAndLastFourDigits();
|
| - suggestion->label = credit_card->GetInfo(
|
| - AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_);
|
| + if (IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled() &&
|
| + !IsKeyboardAccessoryEnabled()) {
|
| + if (ShowExpirationDateInAutofillCreditCardLastUsedDate()) {
|
| + suggestion->label = credit_card->GetInfo(
|
| + AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_);
|
| + }
|
| + if (suggestion->label.empty()) {
|
| + suggestion->label = credit_card->LastUsedDateAsString(
|
| + ShowDetailedTimeInfoInAutofillCreditCardLastUsedDate(),
|
| + ShowExpirationDateInAutofillCreditCardLastUsedDate(),
|
| + app_locale_);
|
| + } else {
|
| + suggestion->label.append(credit_card->LastUsedDateAsString(
|
| + ShowDetailedTimeInfoInAutofillCreditCardLastUsedDate(),
|
| + ShowExpirationDateInAutofillCreditCardLastUsedDate(),
|
| + app_locale_));
|
| + }
|
| + } else {
|
| + suggestion->label = credit_card->GetInfo(
|
| + AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_);
|
| + }
|
| if (IsAutofillCreditCardPopupLayoutExperimentEnabled())
|
| ModifyAutofillCreditCardSuggestion(suggestion);
|
| } else if (credit_card->number().empty()) {
|
|
|