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

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

Issue 190063006: Infobar Componentization Proof of Concept (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes Created 6 years, 9 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/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 a3cebc1f4d1bc8c74e09e965a8b94eade0529d22..d6b68e34bd65bf70115a8a1b09aade4825a133a1 100644
--- a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc
+++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc
@@ -25,15 +25,18 @@ void AutofillCCInfoBarDelegate::Create(
InfoBarService* infobar_service,
const AutofillMetrics* metric_logger,
const base::Closure& save_card_callback) {
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(new AutofillCCInfoBarDelegate(
- metric_logger, save_card_callback))));
+ infobar_service->AddInfoBar(
+ ConfirmInfoBarDelegate::CreateInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
+ new AutofillCCInfoBarDelegate(infobar_service->web_contents(),
+ metric_logger,
+ save_card_callback))));
}
AutofillCCInfoBarDelegate::AutofillCCInfoBarDelegate(
+ content::WebContents* web_contents,
const AutofillMetrics* metric_logger,
const base::Closure& save_card_callback)
- : ConfirmInfoBarDelegate(),
+ : ContentConfirmInfoBarDelegate(web_contents),
metric_logger_(metric_logger),
save_card_callback_(save_card_callback),
had_user_interaction_(false) {
@@ -66,7 +69,7 @@ InfoBarDelegate::Type AutofillCCInfoBarDelegate::GetInfoBarType() const {
}
bool AutofillCCInfoBarDelegate::ShouldExpireInternal(
- const content::LoadCommittedDetails& details) const {
+ const NavigationDetails& details) const {
// The user has submitted a form, causing the page to navigate elsewhere. We
// don't want the infobar to be expired at this point, because the user won't
// get a chance to answer the question.

Powered by Google App Engine
This is Rietveld 408576698