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

Unified Diff: chrome/browser/ui/autofill/chrome_autofill_client.cc

Issue 2839683002: Logs different SaveCardPrompt histogram names depending on if user (Closed)
Patch Set: Uses LogUMAHistogramEnumeration instead of UMA_HISTOGRAM_ENUMERATION because we change histogram na… Created 3 years, 8 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: chrome/browser/ui/autofill/chrome_autofill_client.cc
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc
index a3da12935c39ef96bb82369d7311044b4f59c17f..9c9e27f394a32dc77a2a47f4bb7144d2bd3f1f0f 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -76,8 +76,6 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents)
user_prefs::UserPrefs::Get(web_contents->GetBrowserContext()),
Profile::FromBrowserContext(web_contents->GetBrowserContext())
->IsOffTheRecord()) {
- DCHECK(web_contents);
-
#if !defined(OS_ANDROID)
// Since ZoomController is also a WebContentsObserver, we need to be careful
// about disconnecting from it since the relative order of destruction of
@@ -192,7 +190,7 @@ void ChromeAutofillClient::ConfirmSaveCreditCardLocally(
->AddInfoBar(CreateSaveCardInfoBarMobile(
base::MakeUnique<AutofillSaveCardInfoBarDelegateMobile>(
false, card, std::unique_ptr<base::DictionaryValue>(nullptr),
- callback)));
+ callback, GetPrefs())));
#else
// Do lazy initialization of SaveCardBubbleControllerImpl.
autofill::SaveCardBubbleControllerImpl::CreateForWebContents(
@@ -212,7 +210,7 @@ void ChromeAutofillClient::ConfirmSaveCreditCardToCloud(
InfoBarService::FromWebContents(web_contents())
->AddInfoBar(CreateSaveCardInfoBarMobile(
base::MakeUnique<AutofillSaveCardInfoBarDelegateMobile>(
- true, card, std::move(legal_message), callback)));
+ true, card, std::move(legal_message), callback, GetPrefs())));
#else
// Do lazy initialization of SaveCardBubbleControllerImpl.
autofill::SaveCardBubbleControllerImpl::CreateForWebContents(web_contents());

Powered by Google App Engine
This is Rietveld 408576698