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

Unified Diff: chrome/browser/managed_mode/managed_mode_url_filter.cc

Issue 12412009: [Managed users] Don't early-return when the default filtering behavior is ALLOW. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/managed_mode/managed_mode_url_filter.cc
diff --git a/chrome/browser/managed_mode/managed_mode_url_filter.cc b/chrome/browser/managed_mode/managed_mode_url_filter.cc
index 9ca943fafc73efe4ba0f2e11368026a742fd61cd..2c96654cafbb38dba0f1338cb17b38729b5a9cb8 100644
--- a/chrome/browser/managed_mode/managed_mode_url_filter.cc
+++ b/chrome/browser/managed_mode/managed_mode_url_filter.cc
@@ -193,10 +193,6 @@ ManagedModeURLFilter::FilteringBehavior
ManagedModeURLFilter::GetFilteringBehaviorForURL(const GURL& url) const {
DCHECK(CalledOnValidThread());
- // If the default behavior is to allow, we don't need to check anything else.
- if (default_behavior_ == ALLOW)
- return ALLOW;
-
#if defined(ENABLE_CONFIGURATION_POLICY)
// URLs with a non-standard scheme (e.g. chrome://) are always allowed.
if (!policy::URLBlacklist::HasStandardScheme(url))
@@ -214,6 +210,10 @@ ManagedModeURLFilter::GetFilteringBehaviorForURL(const GURL& url) const {
if (host_it != host_map_.end())
return host_it->second ? ALLOW : BLOCK;
+ // If the default behavior is to allow, we don't need to check anything else.
+ if (default_behavior_ == ALLOW)
+ return ALLOW;
+
// Check the list of URL patterns.
std::set<URLMatcherConditionSet::ID> matching_ids =
contents_->url_matcher.MatchURL(url);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698