Index: chrome/browser/autofill/autofill_cc_infobar_delegate.h |
diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.h b/chrome/browser/autofill/autofill_cc_infobar_delegate.h |
index 717cd900f5b8f054431e7d15c75e535b5d64b55b..2fd4e799708ed9a047d277f78b0d16221bca1729 100644 |
--- a/chrome/browser/autofill/autofill_cc_infobar_delegate.h |
+++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.h |
@@ -27,18 +27,21 @@ |
// Creates an autofill credit card infobar and delegate and adds the infobar |
// to |infobar_service|. |
static void Create(InfoBarService* infobar_service, |
+ const AutofillMetrics* metric_logger, |
const base::Closure& save_card_callback); |
#if defined(UNIT_TEST) |
static scoped_ptr<ConfirmInfoBarDelegate> Create( |
+ const AutofillMetrics* metric_logger, |
const base::Closure& save_card_callback) { |
return scoped_ptr<ConfirmInfoBarDelegate>( |
- new AutofillCCInfoBarDelegate(save_card_callback)); |
+ new AutofillCCInfoBarDelegate(metric_logger, save_card_callback)); |
} |
#endif |
private: |
- explicit AutofillCCInfoBarDelegate(const base::Closure& save_card_callback); |
+ AutofillCCInfoBarDelegate(const AutofillMetrics* metric_logger, |
+ const base::Closure& save_card_callback); |
~AutofillCCInfoBarDelegate() override; |
void LogUserAction(AutofillMetrics::InfoBarMetric user_action); |
@@ -55,6 +58,10 @@ |
base::string16 GetLinkText() const override; |
bool LinkClicked(WindowOpenDisposition disposition) override; |
+ // For logging UMA metrics. |
+ // Weak reference. Owned by the AutofillManager that initiated this infobar. |
+ const AutofillMetrics* metric_logger_; |
+ |
// The callback to save credit card if the user accepts the infobar. |
base::Closure save_card_callback_; |