Index: chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc |
diff --git a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc |
index 6160b6ef887115364a0b1f315a888ae8c43d206c..a867c5112ab233a502596aacef8d46f6d44a72be 100644 |
--- a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc |
+++ b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc |
@@ -7,6 +7,7 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
#include "chrome/browser/infobars/infobar.h" |
+#include "chrome/browser/infobars/infobar_manager.h" |
#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/common/url_constants.h" |
#include "content/public/browser/user_metrics.h" |
@@ -22,12 +23,14 @@ void RegisterProtocolHandlerInfoBarDelegate::Create( |
content::RecordAction( |
base::UserMetricsAction("RegisterProtocolHandler.InfoBar_Shown")); |
- scoped_ptr<InfoBar> infobar(ConfirmInfoBarDelegate::CreateInfoBar( |
- scoped_ptr<ConfirmInfoBarDelegate>( |
- new RegisterProtocolHandlerInfoBarDelegate(registry, handler)))); |
+ scoped_ptr<InfoBar> infobar( |
+ ConfirmInfoBarDelegate::CreateInfoBar(scoped_ptr<ConfirmInfoBarDelegate>( |
+ new RegisterProtocolHandlerInfoBarDelegate( |
+ infobar_service->web_contents(), registry, handler)))); |
- for (size_t i = 0; i < infobar_service->infobar_count(); ++i) { |
- InfoBar* existing_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* existing_infobar = infobar_manager.infobar_at(i); |
RegisterProtocolHandlerInfoBarDelegate* existing_delegate = |
existing_infobar->delegate()-> |
AsRegisterProtocolHandlerInfoBarDelegate(); |
@@ -42,12 +45,12 @@ void RegisterProtocolHandlerInfoBarDelegate::Create( |
} |
RegisterProtocolHandlerInfoBarDelegate::RegisterProtocolHandlerInfoBarDelegate( |
+ content::WebContents* web_contents, |
ProtocolHandlerRegistry* registry, |
const ProtocolHandler& handler) |
- : ConfirmInfoBarDelegate(), |
+ : ContentConfirmInfoBarDelegate(web_contents), |
registry_(registry), |
- handler_(handler) { |
-} |
+ handler_(handler) {} |
RegisterProtocolHandlerInfoBarDelegate:: |
~RegisterProtocolHandlerInfoBarDelegate() { |