| Index: chrome/browser/managed_mode/managed_mode_navigation_observer.cc
|
| diff --git a/chrome/browser/managed_mode/managed_mode_navigation_observer.cc b/chrome/browser/managed_mode/managed_mode_navigation_observer.cc
|
| index bd06cafedd2b045038b760ddc2abf159ce568eb8..b8784c5b2c08599927dc155004a43906cbb3494c 100644
|
| --- a/chrome/browser/managed_mode/managed_mode_navigation_observer.cc
|
| +++ b/chrome/browser/managed_mode/managed_mode_navigation_observer.cc
|
| @@ -11,7 +11,7 @@
|
| #include "chrome/browser/history/history_service.h"
|
| #include "chrome/browser/history/history_service_factory.h"
|
| #include "chrome/browser/history/history_types.h"
|
| -#include "chrome/browser/infobars/confirm_infobar_delegate.h"
|
| +#include "chrome/browser/infobars/content_confirm_infobar_delegate.h"
|
| #include "chrome/browser/infobars/infobar.h"
|
| #include "chrome/browser/infobars/infobar_service.h"
|
| #include "chrome/browser/managed_mode/managed_mode_interstitial.h"
|
| @@ -79,19 +79,19 @@ void GoBackToSafety(content::WebContents* web_contents) {
|
|
|
| // ManagedModeWarningInfoBarDelegate ------------------------------------------
|
|
|
| -class ManagedModeWarningInfoBarDelegate : public ConfirmInfoBarDelegate {
|
| +class ManagedModeWarningInfoBarDelegate : public ContentConfirmInfoBarDelegate {
|
| public:
|
| // Creates a managed mode warning infobar and delegate and adds the infobar to
|
| // |infobar_service|. Returns the infobar if it was successfully added.
|
| static InfoBar* Create(InfoBarService* infobar_service);
|
|
|
| private:
|
| - ManagedModeWarningInfoBarDelegate();
|
| + explicit ManagedModeWarningInfoBarDelegate(
|
| + content::WebContents* web_contents);
|
| virtual ~ManagedModeWarningInfoBarDelegate();
|
|
|
| // ConfirmInfoBarDelegate:
|
| - virtual bool ShouldExpire(
|
| - const content::LoadCommittedDetails& details) const OVERRIDE;
|
| + virtual bool ShouldExpire(const NavigationDetails& details) const OVERRIDE;
|
| virtual void InfoBarDismissed() OVERRIDE;
|
| virtual base::string16 GetMessageText() const OVERRIDE;
|
| virtual int GetButtons() const OVERRIDE;
|
| @@ -105,19 +105,19 @@ class ManagedModeWarningInfoBarDelegate : public ConfirmInfoBarDelegate {
|
| InfoBar* ManagedModeWarningInfoBarDelegate::Create(
|
| InfoBarService* infobar_service) {
|
| return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
|
| - scoped_ptr<ConfirmInfoBarDelegate>(
|
| - new ManagedModeWarningInfoBarDelegate())));
|
| + scoped_ptr<ConfirmInfoBarDelegate>(new ManagedModeWarningInfoBarDelegate(
|
| + infobar_service->web_contents()))));
|
| }
|
|
|
| -ManagedModeWarningInfoBarDelegate::ManagedModeWarningInfoBarDelegate()
|
| - : ConfirmInfoBarDelegate() {
|
| -}
|
| +ManagedModeWarningInfoBarDelegate::ManagedModeWarningInfoBarDelegate(
|
| + content::WebContents* web_contents)
|
| + : ContentConfirmInfoBarDelegate(web_contents) {}
|
|
|
| ManagedModeWarningInfoBarDelegate::~ManagedModeWarningInfoBarDelegate() {
|
| }
|
|
|
| bool ManagedModeWarningInfoBarDelegate::ShouldExpire(
|
| - const content::LoadCommittedDetails& details) const {
|
| + const NavigationDetails& details) const {
|
| // ManagedModeNavigationObserver removes us below.
|
| return false;
|
| }
|
| @@ -188,7 +188,9 @@ void ManagedModeNavigationObserver::ProvisionalChangeToMainFrameUrl(
|
| return;
|
|
|
| // If we shouldn't have a warn infobar remove it here.
|
| - InfoBarService::FromWebContents(web_contents())->RemoveInfoBar(warn_infobar_);
|
| + InfoBarService::FromWebContents(web_contents())
|
| + ->infobar_manager()
|
| + .RemoveInfoBar(warn_infobar_);
|
| warn_infobar_ = NULL;
|
| }
|
|
|
|
|