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

Unified Diff: components/policy/core/common/policy_map.cc

Issue 2641343002: Use source parameter to determine policy priority. (Closed)
Patch Set: Add unit test. Created 3 years, 11 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 | components/policy/core/common/policy_map_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/policy_map.cc
diff --git a/components/policy/core/common/policy_map.cc b/components/policy/core/common/policy_map.cc
index 9ad2627143cc65469a1060fd3ca6fdd9ac32c000..65940f6f7ec59a38b4caa6631c8ac85d554956c3 100644
--- a/components/policy/core/common/policy_map.cc
+++ b/components/policy/core/common/policy_map.cc
@@ -38,7 +38,10 @@ PolicyMap::Entry PolicyMap::Entry::DeepCopy() const {
bool PolicyMap::Entry::has_higher_priority_than(
const PolicyMap::Entry& other) const {
if (level == other.level)
- return scope > other.scope;
+ if (scope == other.scope)
Thiemo Nagel 2017/01/23 13:13:52 This requires braces.
Marton Hunyady 2017/01/23 13:27:50 Done.
+ return source > other.source;
+ else
+ return scope > other.scope;
else
return level > other.level;
}
« no previous file with comments | « no previous file | components/policy/core/common/policy_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698