| 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 6434dec2d7e6929e6edec875373f239c14ef5bfe..162b79613669ca4928d9d9464e7f0d94c403a1c4 100644
|
| --- a/components/autofill/core/browser/personal_data_manager.cc
|
| +++ b/components/autofill/core/browser/personal_data_manager.cc
|
| @@ -673,15 +673,16 @@ void PersonalDataManager::GetCreditCardSuggestions(
|
| base::string16 creditcard_field_value =
|
| credit_card->GetInfo(type, app_locale_);
|
| if (!creditcard_field_value.empty() &&
|
| - StartsWith(creditcard_field_value, field_contents, false)) {
|
| - if (type.GetStorableType() == CREDIT_CARD_NUMBER)
|
| - creditcard_field_value = credit_card->ObfuscatedNumber();
|
| -
|
| + (StartsWith(creditcard_field_value, field_contents, false) ||
|
| + (type.GetStorableType() == CREDIT_CARD_NUMBER &&
|
| + base::string16::npos !=
|
| + creditcard_field_value.find(field_contents)))) {
|
| // If the value is the card number, the label is the expiration date.
|
| // Otherwise the label is the card number, or if that is empty the
|
| // cardholder name. The label should never repeat the value.
|
| base::string16 label;
|
| if (type.GetStorableType() == CREDIT_CARD_NUMBER) {
|
| + creditcard_field_value = credit_card->ObfuscatedNumber();
|
| label = credit_card->GetInfo(
|
| AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_);
|
| } else if (credit_card->number().empty()) {
|
|
|