| Index: components/autofill/core/browser/autofill_cc_infobar_delegate.cc
|
| diff --git a/components/autofill/core/browser/autofill_cc_infobar_delegate.cc b/components/autofill/core/browser/autofill_cc_infobar_delegate.cc
|
| index 97703b27c946f9ae13c1dc7779d9b723b876f47e..d065307bf45e134dd5fef110c95a3ff7a63cbd16 100644
|
| --- a/components/autofill/core/browser/autofill_cc_infobar_delegate.cc
|
| +++ b/components/autofill/core/browser/autofill_cc_infobar_delegate.cc
|
| @@ -37,6 +37,25 @@ void AutofillCCInfoBarDelegate::CreateForUpload(
|
| new AutofillCCInfoBarDelegate(true, save_card_callback))));
|
| }
|
|
|
| +AutofillCCInfoBarDelegate::~AutofillCCInfoBarDelegate() {
|
| + if (!had_user_interaction_)
|
| + LogUserAction(AutofillMetrics::INFOBAR_IGNORED);
|
| +}
|
| +
|
| +int AutofillCCInfoBarDelegate::GetIconId() const {
|
| + return IDR_INFOBAR_AUTOFILL_CC;
|
| +}
|
| +
|
| +base::string16 AutofillCCInfoBarDelegate::GetMessageText() const {
|
| + return l10n_util::GetStringUTF16(
|
| + upload_ ? IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_TO_CLOUD
|
| + : IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_LOCAL);
|
| +}
|
| +
|
| +base::string16 AutofillCCInfoBarDelegate::GetLinkText() const {
|
| + return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
|
| +}
|
| +
|
| AutofillCCInfoBarDelegate::AutofillCCInfoBarDelegate(
|
| bool upload,
|
| const base::Closure& save_card_callback)
|
| @@ -47,11 +66,6 @@ AutofillCCInfoBarDelegate::AutofillCCInfoBarDelegate(
|
| AutofillMetrics::LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_SHOWN);
|
| }
|
|
|
| -AutofillCCInfoBarDelegate::~AutofillCCInfoBarDelegate() {
|
| - if (!had_user_interaction_)
|
| - LogUserAction(AutofillMetrics::INFOBAR_IGNORED);
|
| -}
|
| -
|
| void AutofillCCInfoBarDelegate::LogUserAction(
|
| AutofillMetrics::InfoBarMetric user_action) {
|
| DCHECK(!had_user_interaction_);
|
| @@ -70,10 +84,6 @@ AutofillCCInfoBarDelegate::GetInfoBarType() const {
|
| return PAGE_ACTION_TYPE;
|
| }
|
|
|
| -int AutofillCCInfoBarDelegate::GetIconId() const {
|
| - return IDR_INFOBAR_AUTOFILL_CC;
|
| -}
|
| -
|
| gfx::VectorIconId AutofillCCInfoBarDelegate::GetVectorIconId() const {
|
| #if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_ANDROID)
|
| return gfx::VectorIconId::AUTOFILL;
|
| @@ -94,12 +104,6 @@ void AutofillCCInfoBarDelegate::InfoBarDismissed() {
|
| LogUserAction(AutofillMetrics::INFOBAR_DENIED);
|
| }
|
|
|
| -base::string16 AutofillCCInfoBarDelegate::GetMessageText() const {
|
| - return l10n_util::GetStringUTF16(
|
| - upload_ ? IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_TO_CLOUD
|
| - : IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_LOCAL);
|
| -}
|
| -
|
| base::string16 AutofillCCInfoBarDelegate::GetButtonLabel(
|
| InfoBarButton button) const {
|
| return l10n_util::GetStringUTF16(button == BUTTON_OK
|
| @@ -119,10 +123,6 @@ bool AutofillCCInfoBarDelegate::Cancel() {
|
| return true;
|
| }
|
|
|
| -base::string16 AutofillCCInfoBarDelegate::GetLinkText() const {
|
| - return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
|
| -}
|
| -
|
| GURL AutofillCCInfoBarDelegate::GetLinkURL() const {
|
| return GURL(kHelpURL);
|
| }
|
|
|