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

Side by Side Diff: components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc

Issue 2026353002: [Autofill] Credit Card Assist Infobar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaning Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/core/browser/autofill_save_card_infobar_delegate_m obile.h" 5 #include "components/autofill/core/browser/autofill_save_card_infobar_delegate_m obile.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 void AutofillSaveCardInfoBarDelegateMobile::InfoBarDismissed() { 92 void AutofillSaveCardInfoBarDelegateMobile::InfoBarDismissed() {
93 LogUserAction(AutofillMetrics::INFOBAR_DENIED); 93 LogUserAction(AutofillMetrics::INFOBAR_DENIED);
94 } 94 }
95 95
96 base::string16 AutofillSaveCardInfoBarDelegateMobile::GetButtonLabel( 96 base::string16 AutofillSaveCardInfoBarDelegateMobile::GetButtonLabel(
97 InfoBarButton button) const { 97 InfoBarButton button) const {
98 return l10n_util::GetStringUTF16(button == BUTTON_OK 98 return l10n_util::GetStringUTF16(button == BUTTON_OK
99 ? IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT 99 ? IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT
100 : IDS_AUTOFILL_SAVE_CARD_PROMPT_DENY); 100 : IDS_NO_THANKS);
101 } 101 }
102 102
103 bool AutofillSaveCardInfoBarDelegateMobile::Accept() { 103 bool AutofillSaveCardInfoBarDelegateMobile::Accept() {
104 save_card_callback_.Run(); 104 save_card_callback_.Run();
105 save_card_callback_.Reset(); 105 save_card_callback_.Reset();
106 LogUserAction(AutofillMetrics::INFOBAR_ACCEPTED); 106 LogUserAction(AutofillMetrics::INFOBAR_ACCEPTED);
107 return true; 107 return true;
108 } 108 }
109 109
110 bool AutofillSaveCardInfoBarDelegateMobile::Cancel() { 110 bool AutofillSaveCardInfoBarDelegateMobile::Cancel() {
111 LogUserAction(AutofillMetrics::INFOBAR_DENIED); 111 LogUserAction(AutofillMetrics::INFOBAR_DENIED);
112 return true; 112 return true;
113 } 113 }
114 114
115 GURL AutofillSaveCardInfoBarDelegateMobile::GetLinkURL() const { 115 GURL AutofillSaveCardInfoBarDelegateMobile::GetLinkURL() const {
116 return GURL(kHelpURL); 116 return GURL(kHelpURL);
117 } 117 }
118 118
119 void AutofillSaveCardInfoBarDelegateMobile::LogUserAction( 119 void AutofillSaveCardInfoBarDelegateMobile::LogUserAction(
120 AutofillMetrics::InfoBarMetric user_action) { 120 AutofillMetrics::InfoBarMetric user_action) {
121 DCHECK(!had_user_interaction_); 121 DCHECK(!had_user_interaction_);
122 122
123 AutofillMetrics::LogCreditCardInfoBarMetric(user_action); 123 AutofillMetrics::LogCreditCardInfoBarMetric(user_action);
124 had_user_interaction_ = true; 124 had_user_interaction_ = true;
125 } 125 }
126 126
127 } // namespace autofill 127 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_metrics.cc ('k') | components/autofill/core/browser/form_structure.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698