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

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

Issue 2457623003: Add comment about wrong policy merging (Closed)
Patch Set: Add bug number Created 4 years, 2 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: components/policy/core/common/policy_loader_win.cc
diff --git a/components/policy/core/common/policy_loader_win.cc b/components/policy/core/common/policy_loader_win.cc
index affe11149fbbabb806d807f6840bf101feaad505..d67278e5ee06c4195549dba2ddf783a4cfc0f412 100644
--- a/components/policy/core/common/policy_loader_win.cc
+++ b/components/policy/core/common/policy_loader_win.cc
@@ -479,6 +479,7 @@ bool PolicyLoaderWin::LoadGPOPolicy(PolicyScope scope,
// Merge with existing forced policy, giving precedence to the existing
// forced policy.
+ // TODO(ljusten): Same problem as below.
new_forced_policy.Merge(forced_policy);
forced_policy.Swap(&new_forced_policy);
} else {
@@ -488,6 +489,11 @@ bool PolicyLoaderWin::LoadGPOPolicy(PolicyScope scope,
}
// Merge, give precedence to forced policy.
+ // TODO(ljusten): This doesn't work properly if policies are explicitly
+ // disabled or string list policies have less entries in the forced_policy.
+ // The merged dictionary still has excessive policies and strings. To fix
+ // this, use only one dict and call ReadPRegFile in the proper order (forced
+ // last). See crbug.com/659979.
parsed_policy.Merge(forced_policy);
policy->Swap(&parsed_policy);
« 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