Commit 74cfdc56 authored by sczs's avatar sczs Committed by Commit Bot

Adds card details getters to AutoFillSaveCardInfobarDelegate

- These new strings will be used to configure the new Infobar
modal on iOS.

Bug: 1014652
Change-Id: I2f79de8bef51c38d37947c25fb5b55dce825901f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1904948Reviewed-by: default avatarJared Saul <jsaul@google.com>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714269}
parent 90072a7b
...@@ -51,6 +51,9 @@ AutofillSaveCardInfoBarDelegateMobile::AutofillSaveCardInfoBarDelegateMobile( ...@@ -51,6 +51,9 @@ AutofillSaveCardInfoBarDelegateMobile::AutofillSaveCardInfoBarDelegateMobile(
card_label_(card.NetworkAndLastFourDigits()), card_label_(card.NetworkAndLastFourDigits()),
card_sub_label_(card.AbbreviatedExpirationDateForDisplay(false)), card_sub_label_(card.AbbreviatedExpirationDateForDisplay(false)),
card_last_four_digits_(card.LastFourDigits()), card_last_four_digits_(card.LastFourDigits()),
cardholder_name_(card.GetRawInfo(CREDIT_CARD_NAME_FULL)),
expiration_date_month_(card.ExpirationMonthAsString()),
expiration_date_year_(card.Expiration4DigitYearAsString()),
legal_message_lines_(legal_message_lines), legal_message_lines_(legal_message_lines),
is_off_the_record_(is_off_the_record) { is_off_the_record_(is_off_the_record) {
DCHECK_EQ(upload, !upload_save_card_prompt_callback_.is_null()); DCHECK_EQ(upload, !upload_save_card_prompt_callback_.is_null());
......
...@@ -46,6 +46,16 @@ class AutofillSaveCardInfoBarDelegateMobile : public ConfirmInfoBarDelegate { ...@@ -46,6 +46,16 @@ class AutofillSaveCardInfoBarDelegateMobile : public ConfirmInfoBarDelegate {
const LegalMessageLines& legal_message_lines() const { const LegalMessageLines& legal_message_lines() const {
return legal_message_lines_; return legal_message_lines_;
} }
const base::string16& card_last_four_digits() const {
return card_last_four_digits_;
}
const base::string16& cardholder_name() const { return cardholder_name_; }
const base::string16& expiration_date_month() const {
return expiration_date_month_;
}
const base::string16& expiration_date_year() const {
return expiration_date_year_;
}
// Called when a link in the legal message text was clicked. // Called when a link in the legal message text was clicked.
void OnLegalMessageLinkClicked(GURL url); void OnLegalMessageLinkClicked(GURL url);
...@@ -111,6 +121,15 @@ class AutofillSaveCardInfoBarDelegateMobile : public ConfirmInfoBarDelegate { ...@@ -111,6 +121,15 @@ class AutofillSaveCardInfoBarDelegateMobile : public ConfirmInfoBarDelegate {
// The last four digits of the card for which save is being offered. // The last four digits of the card for which save is being offered.
base::string16 card_last_four_digits_; base::string16 card_last_four_digits_;
// The card holder name of the card for which save is being offered.
base::string16 cardholder_name_;
// The expiration month of the card for which save is being offered.
base::string16 expiration_date_month_;
// The expiration year of the card for which save is being offered.
base::string16 expiration_date_year_;
// The legal message lines to show in the content of the infobar. // The legal message lines to show in the content of the infobar.
const LegalMessageLines& legal_message_lines_; const LegalMessageLines& legal_message_lines_;
......
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