Chromium Code Reviews| 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..852b412ba3d1a804229b72bbb938a00bf99e0e36 100644 |
| --- a/chrome/browser/supervised_user/supervised_user_navigation_throttle.cc |
| +++ b/chrome/browser/supervised_user/supervised_user_navigation_throttle.cc |
| @@ -120,7 +120,9 @@ void RecordFilterResultEvent( |
| std::unique_ptr<SupervisedUserNavigationThrottle> |
| SupervisedUserNavigationThrottle::MaybeCreateThrottleFor( |
| content::NavigationHandle* navigation_handle) { |
| - if (!navigation_handle->IsInMainFrame()) |
| + Profile* profile = Profile::FromBrowserContext( |
| + navigation_handle->GetWebContents()->GetBrowserContext()); |
| + if (!profile->IsSupervised() || !navigation_handle->IsInMainFrame()) |
|
Bernhard Bauer
2017/04/05 09:31:12
I would split these up into two separate checks.
Marc Treib
2017/04/05 11:43:33
Done.
|
| return nullptr; |
| // Can't use base::MakeUnique because the constructor is private. |
| return base::WrapUnique( |