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

Side by Side Diff: chrome/browser/ui/autofill/chrome_autofill_client.cc

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/autofill/chrome_autofill_client.h" 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" 9 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
10 #include "chrome/browser/autofill/personal_data_manager_factory.h" 10 #include "chrome/browser/autofill/personal_data_manager_factory.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #if defined(OS_ANDROID) 100 #if defined(OS_ANDROID)
101 chrome::android::ChromiumApplication::ShowAutofillSettings(); 101 chrome::android::ChromiumApplication::ShowAutofillSettings();
102 #else 102 #else
103 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); 103 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_);
104 if (browser) 104 if (browser)
105 chrome::ShowSettingsSubPage(browser, chrome::kAutofillSubPage); 105 chrome::ShowSettingsSubPage(browser, chrome::kAutofillSubPage);
106 #endif // #if defined(OS_ANDROID) 106 #endif // #if defined(OS_ANDROID)
107 } 107 }
108 108
109 void ChromeAutofillClient::ConfirmSaveCreditCard( 109 void ChromeAutofillClient::ConfirmSaveCreditCard(
110 const AutofillMetrics& metric_logger,
111 const base::Closure& save_card_callback) { 110 const base::Closure& save_card_callback) {
112 InfoBarService* infobar_service = 111 InfoBarService* infobar_service =
113 InfoBarService::FromWebContents(web_contents_); 112 InfoBarService::FromWebContents(web_contents_);
114 AutofillCCInfoBarDelegate::Create( 113 AutofillCCInfoBarDelegate::Create(infobar_service, save_card_callback);
115 infobar_service, &metric_logger, save_card_callback);
116 } 114 }
117 115
118 bool ChromeAutofillClient::HasCreditCardScanFeature() { 116 bool ChromeAutofillClient::HasCreditCardScanFeature() {
119 return CreditCardScannerController::HasCreditCardScanFeature(); 117 return CreditCardScannerController::HasCreditCardScanFeature();
120 } 118 }
121 119
122 void ChromeAutofillClient::ScanCreditCard( 120 void ChromeAutofillClient::ScanCreditCard(
123 const CreditCardScanCallback& callback) { 121 const CreditCardScanCallback& callback) {
124 CreditCardScannerController::ScanCreditCard(web_contents(), callback); 122 CreditCardScannerController::ScanCreditCard(web_contents(), callback);
125 } 123 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 profile_full_name); 221 profile_full_name);
224 #endif // defined(OS_ANDROID) 222 #endif // defined(OS_ANDROID)
225 } 223 }
226 224
227 void ChromeAutofillClient::OnFirstUserGestureObserved() { 225 void ChromeAutofillClient::OnFirstUserGestureObserved() {
228 web_contents()->SendToAllFrames( 226 web_contents()->SendToAllFrames(
229 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); 227 new AutofillMsg_FirstUserGestureObservedInTab(routing_id()));
230 } 228 }
231 229
232 } // namespace autofill 230 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.h ('k') | components/autofill/core/browser/autofill_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698