Index: components/autofill/core/browser/credit_card.cc |
diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc |
index 232fca5dc92e1fc7b6abd0db7c57add4e5e1eac9..b7c80e28c13d495b98b24e5f34336f69fae61264 100644 |
--- a/components/autofill/core/browser/credit_card.cc |
+++ b/components/autofill/core/browser/credit_card.cc |
@@ -503,6 +503,15 @@ base::string16 CreditCard::TypeAndLastFourDigits() const { |
return type + base::UTF8ToUTF16("\xC2\xA0\xE2\x8B\xAF") + digits; |
} |
+base::string16 CreditCard::AbbreviatedExpirationDateForDisplay() const { |
+ base::string16 month = ExpirationMonthAsString(); |
+ base::string16 year = Expiration2DigitYearAsString(); |
+ return month.empty() || year.empty() |
+ ? base::string16() |
+ : l10n_util::GetStringFUTF16( |
+ IDS_AUTOFILL_CREDIT_CARD_EXPIRATION_DATE_ABBR, month, year); |
+} |
+ |
void CreditCard::operator=(const CreditCard& credit_card) { |
set_use_count(credit_card.use_count()); |
set_use_date(credit_card.use_date()); |