Commit eadba519 authored by treib's avatar treib Committed by Commit bot

Supervised user blacklist: Move blacklist priority below content packs.

BUG=410824

Review URL: https://codereview.chromium.org/577933002

Cr-Commit-Position: refs/heads/master@{#295259}
parent 2aa8d2e9
...@@ -290,11 +290,9 @@ SupervisedUserURLFilter::GetFilteringBehaviorForURL(const GURL& url) const { ...@@ -290,11 +290,9 @@ SupervisedUserURLFilter::GetFilteringBehaviorForURL(const GURL& url) const {
} }
} }
if (blacklist_ && blacklist_->HasURL(url)) // If there's no blacklist and the default behavior is to allow, we don't need
return BLOCK; // to check anything else.
if (!blacklist_ && default_behavior_ == ALLOW)
// If the default behavior is to allow, we don't need to check anything else.
if (default_behavior_ == ALLOW)
return ALLOW; return ALLOW;
// Check the list of URL patterns. // Check the list of URL patterns.
...@@ -307,6 +305,10 @@ SupervisedUserURLFilter::GetFilteringBehaviorForURL(const GURL& url) const { ...@@ -307,6 +305,10 @@ SupervisedUserURLFilter::GetFilteringBehaviorForURL(const GURL& url) const {
if (contents_->hash_site_map.count(GetHostnameHash(url))) if (contents_->hash_site_map.count(GetHostnameHash(url)))
return ALLOW; return ALLOW;
// Check the static blacklist.
if (blacklist_ && blacklist_->HasURL(url))
return BLOCK;
// Fall back to the default behavior. // Fall back to the default behavior.
return default_behavior_; return default_behavior_;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment