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

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

Issue 2795993002: SupervisedUserNavigationThrottle: create only for supervised profiles (Closed)
Patch Set: review Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/supervised_user_navigation_throttle.cc
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_throttle.cc b/chrome/browser/supervised_user/supervised_user_navigation_throttle.cc
index ec74ae4619168776036806ad3ac4fee5cc00944f..b0e6c8fc9576b80f8e45326e6a403650d335e40e 100644
--- a/chrome/browser/supervised_user/supervised_user_navigation_throttle.cc
+++ b/chrome/browser/supervised_user/supervised_user_navigation_throttle.cc
@@ -122,6 +122,10 @@ SupervisedUserNavigationThrottle::MaybeCreateThrottleFor(
content::NavigationHandle* navigation_handle) {
if (!navigation_handle->IsInMainFrame())
return nullptr;
+ Profile* profile = Profile::FromBrowserContext(
+ navigation_handle->GetWebContents()->GetBrowserContext());
+ if (!profile->IsSupervised())
+ return nullptr;
// Can't use base::MakeUnique because the constructor is private.
return base::WrapUnique(
new SupervisedUserNavigationThrottle(navigation_handle));
« no previous file with comments | « no previous file | chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698