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

Unified Diff: chrome/browser/supervised_user/supervised_user_navigation_observer.cc

Issue 568163004: Remove the use of ProvisionalChangeToMainFrameUrl from supervised user code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/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;
}
}
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_navigation_observer.h ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698