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 {
}
}
if (blacklist_ && blacklist_->HasURL(url))
return BLOCK;
// If the default behavior is to allow, we don't need to check anything else.
if (default_behavior_ == ALLOW)
// If there's no blacklist and the default behavior is to allow, we don't need
// to check anything else.
if (!blacklist_ && default_behavior_ == ALLOW)
return ALLOW;
// Check the list of URL patterns.
......@@ -307,6 +305,10 @@ SupervisedUserURLFilter::GetFilteringBehaviorForURL(const GURL& url) const {
if (contents_->hash_site_map.count(GetHostnameHash(url)))
return ALLOW;
// Check the static blacklist.
if (blacklist_ && blacklist_->HasURL(url))
return BLOCK;
// Fall back to the 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