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

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

Issue 2641343002: Use source parameter to determine policy priority. (Closed)
Patch Set: Fix comment format. 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 | « components/policy/core/common/policy_map.h ('k') | 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..1814be07e5b9f5af1eeda75bc48d8fd9a221d446 100644
--- a/components/policy/core/common/policy_map.cc
+++ b/components/policy/core/common/policy_map.cc
@@ -37,10 +37,13 @@ PolicyMap::Entry PolicyMap::Entry::DeepCopy() const {
bool PolicyMap::Entry::has_higher_priority_than(
const PolicyMap::Entry& other) const {
- if (level == other.level)
+ if (level == other.level) {
+ if (scope == other.scope) {
+ return source > other.source;
+ }
return scope > other.scope;
- else
- return level > other.level;
+ }
+ return level > other.level;
}
bool PolicyMap::Entry::Equals(const PolicyMap::Entry& other) const {
« no previous file with comments | « components/policy/core/common/policy_map.h ('k') | components/policy/core/common/policy_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698