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

Unified Diff: components/policy/core/common/policy_loader_mac.mm

Issue 1304843004: Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed another test. Created 5 years, 3 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
Index: components/policy/core/common/policy_loader_mac.mm
diff --git a/components/policy/core/common/policy_loader_mac.mm b/components/policy/core/common/policy_loader_mac.mm
index e10735b7a3bf94e65378ebcbda5f03cd8407be8c..2f8001de3f37641066f6e3698eff2d6c68b52fc2 100644
--- a/components/policy/core/common/policy_loader_mac.mm
+++ b/components/policy/core/common/policy_loader_mac.mm
@@ -86,8 +86,8 @@ scoped_ptr<PolicyBundle> PolicyLoaderMac::Load() {
// TODO(joaodasilva): figure the policy scope.
scoped_ptr<base::Value> policy = PropertyToValue(value);
if (policy) {
- chrome_policy.Set(it.key(), level, POLICY_SCOPE_USER, policy.release(),
- NULL);
+ chrome_policy.Set(it.key(), level, POLICY_SCOPE_USER,
+ POLICY_SOURCE_PLATFORM, policy.release(), nullptr);
} else {
status.Add(POLICY_LOAD_STATUS_PARSE_ERROR);
}
@@ -180,8 +180,8 @@ void PolicyLoaderMac::LoadPolicyForComponent(
forced ? POLICY_LEVEL_MANDATORY : POLICY_LEVEL_RECOMMENDED;
scoped_ptr<base::Value> policy_value = PropertyToValue(value);
if (policy_value) {
- policy->Set(it.key(), level, POLICY_SCOPE_USER, policy_value.release(),
- NULL);
+ policy->Set(it.key(), level, POLICY_SCOPE_USER, POLICY_SOURCE_PLATFORM,
+ policy_value.release(), nullptr);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698