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

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

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.h
diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.h b/chrome/browser/autofill/autofill_cc_infobar_delegate.h
index fce8616b8f90092770d49bed046120550b12efd2..5b623f4913fd7d6b8db3d162c821c5f5fc68e248 100644
--- a/chrome/browser/autofill/autofill_cc_infobar_delegate.h
+++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.h
@@ -10,7 +10,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
-#include "chrome/browser/infobars/confirm_infobar_delegate.h"
+#include "chrome/browser/infobars/content_confirm_infobar_delegate.h"
#include "components/autofill/core/browser/autofill_metrics.h"
#include "ui/base/window_open_disposition.h"
@@ -25,7 +25,7 @@ namespace autofill {
// An InfoBar delegate that enables the user to allow or deny storing credit
// card information gathered from a form submission.
-class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate {
+class AutofillCCInfoBarDelegate : public ContentConfirmInfoBarDelegate {
public:
// Creates an autofill credit card infobar and delegate and adds the infobar
// to |infobar_service|.
@@ -35,15 +35,17 @@ class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate {
#if defined(UNIT_TEST)
static scoped_ptr<ConfirmInfoBarDelegate> Create(
+ content::WebContents* web_contents,
const AutofillMetrics* metric_logger,
const base::Closure& save_card_callback) {
- return scoped_ptr<ConfirmInfoBarDelegate>(
- new AutofillCCInfoBarDelegate(metric_logger, save_card_callback));
+ return scoped_ptr<ConfirmInfoBarDelegate>(new AutofillCCInfoBarDelegate(
+ web_contents, metric_logger, save_card_callback));
}
#endif
private:
- AutofillCCInfoBarDelegate(const AutofillMetrics* metric_logger,
+ AutofillCCInfoBarDelegate(content::WebContents* web_contents,
+ const AutofillMetrics* metric_logger,
const base::Closure& save_card_callback);
virtual ~AutofillCCInfoBarDelegate();
@@ -53,8 +55,8 @@ class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate {
virtual void InfoBarDismissed() OVERRIDE;
virtual int GetIconID() const OVERRIDE;
virtual Type GetInfoBarType() const OVERRIDE;
- virtual bool ShouldExpireInternal(
- const content::LoadCommittedDetails& details) const OVERRIDE;
+ virtual bool ShouldExpireInternal(const NavigationDetails& details) const
+ OVERRIDE;
virtual base::string16 GetMessageText() const OVERRIDE;
virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
virtual bool Accept() OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698