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

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

Issue 2564043002: Supervised Users: Create ResourceThrottle only if filtering is enabled (Closed)
Patch Set: update SearchTest Created 4 years 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_resource_throttle.cc
diff --git a/chrome/browser/supervised_user/supervised_user_resource_throttle.cc b/chrome/browser/supervised_user/supervised_user_resource_throttle.cc
index a0695f62832cb69fde6718abf6ec87705b757bce..53df77ad41091d8249c0142e290fb467b7dfcdaf 100644
--- a/chrome/browser/supervised_user/supervised_user_resource_throttle.cc
+++ b/chrome/browser/supervised_user/supervised_user_resource_throttle.cc
@@ -117,7 +117,7 @@ SupervisedUserResourceThrottle::MaybeCreate(
const SupervisedUserURLFilter* url_filter) {
// Only treat main frame requests (ignoring subframes and subresources).
bool is_main_frame = resource_type == content::RESOURCE_TYPE_MAIN_FRAME;
- if (!is_main_frame)
+ if (!is_main_frame || !url_filter->enabled())
return nullptr;
// Can't use base::MakeUnique because the constructor is private.

Powered by Google App Engine
This is Rietveld 408576698