Index: chrome/browser/infobars/insecure_content_infobar_delegate.cc |
diff --git a/chrome/browser/infobars/insecure_content_infobar_delegate.cc b/chrome/browser/infobars/insecure_content_infobar_delegate.cc |
index 90d1cb7f31327443a0704f9d7e72cb86fe1c0949..b0da0c3011adfa58bead6c8aa0ee0785cc803e85 100644 |
--- a/chrome/browser/infobars/insecure_content_infobar_delegate.cc |
+++ b/chrome/browser/infobars/insecure_content_infobar_delegate.cc |
@@ -7,6 +7,7 @@ |
#include "base/metrics/histogram.h" |
#include "chrome/browser/google/google_util.h" |
#include "chrome/browser/infobars/infobar.h" |
+#include "chrome/browser/infobars/infobar_manager.h" |
#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/common/render_messages.h" |
#include "content/public/browser/render_frame_host.h" |
@@ -21,13 +22,14 @@ |
void InsecureContentInfoBarDelegate::Create(InfoBarService* infobar_service, |
InfoBarType type) { |
scoped_ptr<InfoBar> new_infobar(ConfirmInfoBarDelegate::CreateInfoBar( |
- scoped_ptr<ConfirmInfoBarDelegate>( |
- new InsecureContentInfoBarDelegate(type)))); |
+ scoped_ptr<ConfirmInfoBarDelegate>(new InsecureContentInfoBarDelegate( |
+ infobar_service->web_contents(), type)))); |
// Only supsersede an existing insecure content infobar if we are upgrading |
// from DISPLAY to RUN. |
- for (size_t i = 0; i < infobar_service->infobar_count(); ++i) { |
- InfoBar* old_infobar = infobar_service->infobar_at(i); |
+ InfoBarManager& infobar_manager = infobar_service->infobar_manager(); |
+ for (size_t i = 0; i < infobar_manager.infobar_count(); ++i) { |
+ InfoBar* old_infobar = infobar_manager.infobar_at(i); |
InsecureContentInfoBarDelegate* delegate = |
old_infobar->delegate()->AsInsecureContentInfoBarDelegate(); |
if (delegate != NULL) { |
@@ -45,10 +47,10 @@ void InsecureContentInfoBarDelegate::Create(InfoBarService* infobar_service, |
NUM_EVENTS); |
} |
-InsecureContentInfoBarDelegate::InsecureContentInfoBarDelegate(InfoBarType type) |
- : ConfirmInfoBarDelegate(), |
- type_(type) { |
-} |
+InsecureContentInfoBarDelegate::InsecureContentInfoBarDelegate( |
+ content::WebContents* web_contents, |
+ InfoBarType type) |
+ : ContentConfirmInfoBarDelegate(web_contents), type_(type) {} |
InsecureContentInfoBarDelegate::~InsecureContentInfoBarDelegate() { |
} |