| Index: chrome/browser/supervised_user/supervised_user_navigation_observer.cc
|
| diff --git a/chrome/browser/supervised_user/supervised_user_navigation_observer.cc b/chrome/browser/supervised_user/supervised_user_navigation_observer.cc
|
| index 1e186b673b1772e5fea986433c5b5fbfe863fa58..6a8c34f88bb2a9cd83cf482ab05777d8d87d43d8 100644
|
| --- a/chrome/browser/supervised_user/supervised_user_navigation_observer.cc
|
| +++ b/chrome/browser/supervised_user/supervised_user_navigation_observer.cc
|
| @@ -178,20 +178,6 @@ void SupervisedUserNavigationObserver::WarnInfoBarDismissed() {
|
| warn_infobar_ = NULL;
|
| }
|
|
|
| -void SupervisedUserNavigationObserver::ProvisionalChangeToMainFrameUrl(
|
| - const GURL& url,
|
| - content::RenderFrameHost* render_frame_host) {
|
| - SupervisedUserURLFilter::FilteringBehavior behavior =
|
| - url_filter_->GetFilteringBehaviorForURL(url);
|
| -
|
| - if (behavior == SupervisedUserURLFilter::WARN || !warn_infobar_)
|
| - return;
|
| -
|
| - // If we shouldn't have a warn infobar remove it here.
|
| - InfoBarService::FromWebContents(web_contents())->RemoveInfoBar(warn_infobar_);
|
| - warn_infobar_ = NULL;
|
| -}
|
| -
|
| void SupervisedUserNavigationObserver::DidCommitProvisionalLoadForFrame(
|
| content::RenderFrameHost* render_frame_host,
|
| const GURL& url,
|
| @@ -206,6 +192,10 @@ void SupervisedUserNavigationObserver::DidCommitProvisionalLoadForFrame(
|
| if (behavior == SupervisedUserURLFilter::WARN && !warn_infobar_) {
|
| warn_infobar_ = SupervisedUserWarningInfoBarDelegate::Create(
|
| InfoBarService::FromWebContents(web_contents()));
|
| + } else if (behavior != SupervisedUserURLFilter::WARN && warn_infobar_) {
|
| + InfoBarService::FromWebContents(web_contents())->
|
| + RemoveInfoBar(warn_infobar_);
|
| + warn_infobar_ = NULL;
|
| }
|
| }
|
|
|
|
|