Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: components/autofill/core/browser/personal_data_manager.cc

Issue 1540423004: Add card details and legal message to Android save credit card infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Edits Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 4193de5980fdc9cb80ea13a7bb7e49badfe2c7df..54b499d2eab5b9e4a875720d207d036b51bd930c 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -975,7 +975,7 @@ std::vector<Suggestion> PersonalDataManager::GetCreditCardSuggestions(
// Otherwise the label is the card number, or if that is empty the
// cardholder name. The label should never repeat the value.
if (type.GetStorableType() == CREDIT_CARD_NUMBER) {
- suggestion->value = credit_card->TypeAndLastFourDigits();
+ suggestion->value = credit_card->TypeAndLastFourDigitsForDisplay();
suggestion->label = credit_card->GetInfo(
AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_);
} else if (credit_card->number().empty()) {
@@ -986,8 +986,8 @@ std::vector<Suggestion> PersonalDataManager::GetCreditCardSuggestions(
} else {
#if defined(OS_ANDROID)
// Since Android places the label on its own row, there's more horizontal
- // space to work with. Show "Amex - 1234" rather than desktop's "*1234".
- suggestion->label = credit_card->TypeAndLastFourDigits();
+ // space to work with. Show "Amex ***1234" rather than desktop's "*1234".
+ suggestion->label = credit_card->TypeAndLastFourDigitsForDisplay();
#else
suggestion->label = base::ASCIIToUTF16("*");
suggestion->label.append(credit_card->LastFourDigits());

Powered by Google App Engine
This is Rietveld 408576698