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

Unified Diff: components/autofill/core/browser/autofill_cc_infobar_delegate.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: components/autofill review. 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/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);
}
« no previous file with comments | « components/autofill/core/browser/autofill_cc_infobar_delegate.h ('k') | components/autofill/core/browser/autofill_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698