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

Unified Diff: chrome/browser/autofill/autofill_cc_infobar_delegate.h

Issue 780423002: Don't deref stale AutofillMetrics pointer in AutofillCCInfoBarDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: static-ify Created 6 years 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: 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 2fd4e799708ed9a047d277f78b0d16221bca1729..717cd900f5b8f054431e7d15c75e535b5d64b55b 100644
--- a/chrome/browser/autofill/autofill_cc_infobar_delegate.h
+++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.h
@@ -27,21 +27,18 @@ class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate {
// 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(metric_logger, save_card_callback));
+ new AutofillCCInfoBarDelegate(save_card_callback));
}
#endif
private:
- AutofillCCInfoBarDelegate(const AutofillMetrics* metric_logger,
- const base::Closure& save_card_callback);
+ explicit AutofillCCInfoBarDelegate(const base::Closure& save_card_callback);
~AutofillCCInfoBarDelegate() override;
void LogUserAction(AutofillMetrics::InfoBarMetric user_action);
@@ -58,10 +55,6 @@ class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate {
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_;
« no previous file with comments | « android_webview/native/aw_autofill_client.cc ('k') | chrome/browser/autofill/autofill_cc_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698