Chromium Code Reviews| Index: chrome/browser/autofill/autofill_cc_infobar_delegate.cc |
| diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc |
| index f2fd9ea8d0e636e17b3b0e6409ad247c578504f4..dfcc764cb31e6353a44c72d62c9747175721317f 100644 |
| --- a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc |
| +++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc |
| @@ -36,22 +36,15 @@ AutofillCCInfoBarDelegate::AutofillCCInfoBarDelegate( |
| const base::Closure& save_card_callback) |
| : ConfirmInfoBarDelegate(), |
| metric_logger_(metric_logger), |
| - save_card_callback_(save_card_callback), |
| - had_user_interaction_(false) { |
| + save_card_callback_(save_card_callback) { |
| metric_logger->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_); |
| - |
| - metric_logger_->LogCreditCardInfoBarMetric(user_action); |
|
Ilya Sherman
2014/12/05 22:58:54
Rather than breaking the metrics, let's just make
Evan Stade
2014/12/05 23:42:47
Done.
"Break" is a strong word. I'd instead say "
|
| - had_user_interaction_ = true; |
| } |
| void AutofillCCInfoBarDelegate::InfoBarDismissed() { |
| @@ -87,13 +80,12 @@ base::string16 AutofillCCInfoBarDelegate::GetButtonLabel( |
| bool AutofillCCInfoBarDelegate::Accept() { |
| save_card_callback_.Run(); |
| - save_card_callback_.Reset(); |
| - LogUserAction(AutofillMetrics::INFOBAR_ACCEPTED); |
| + metric_logger_->LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_ACCEPTED); |
| return true; |
| } |
| bool AutofillCCInfoBarDelegate::Cancel() { |
| - LogUserAction(AutofillMetrics::INFOBAR_DENIED); |
| + metric_logger_->LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_DENIED); |
| return true; |
| } |