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

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

Issue 2776493005: Convert SupervisedUserResourceThrottle to a NavigationThrottle. (Closed)
Patch Set: Response to comments Created 3 years, 9 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 a13eb5fd8afbfe61e61721ff10f8d36902db7c9e..56edc80fde92452957ca4c5ecb9e76b72191ce1c 100644
--- a/chrome/browser/supervised_user/supervised_user_navigation_observer.cc
+++ b/chrome/browser/supervised_user/supervised_user_navigation_observer.cc
@@ -37,23 +37,16 @@ SupervisedUserNavigationObserver::SupervisedUserNavigationObserver(
Profile::FromBrowserContext(web_contents->GetBrowserContext());
supervised_user_service_ =
SupervisedUserServiceFactory::GetForProfile(profile);
- url_filter_ = supervised_user_service_->GetURLFilterForUIThread();
+ url_filter_ = supervised_user_service_->GetURLFilter();
supervised_user_service_->AddObserver(this);
}
// static
void SupervisedUserNavigationObserver::OnRequestBlocked(
- const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
+ content::WebContents* web_contents,
const GURL& url,
supervised_user_error_page::FilteringBehaviorReason reason,
const base::Callback<void(bool)>& callback) {
- content::WebContents* web_contents = web_contents_getter.Run();
- if (!web_contents) {
- content::BrowserThread::PostTask(
- content::BrowserThread::IO, FROM_HERE, base::Bind(callback, false));
- return;
- }
-
SupervisedUserNavigationObserver* navigation_observer =
SupervisedUserNavigationObserver::FromWebContents(web_contents);
if (navigation_observer)

Powered by Google App Engine
This is Rietveld 408576698