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

Unified Diff: components/policy/tools/generate_policy_source.py

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: 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/tools/generate_policy_source.py
diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py
index 105a8606721ccff5ebf6f72953f29619ba1a0966..3a740f34ae418c7790ceb1ee6b88f8518a53e3eb 100755
--- a/components/policy/tools/generate_policy_source.py
+++ b/components/policy/tools/generate_policy_source.py
@@ -716,11 +716,13 @@ def _WritePolicyConstantSource(policies, os, f):
'enterprise defaults' % (policy.policy_type,
policy.name))
f.write(' if (!policy_map->Get(key::k%s)) {\n'
- ' policy_map->Set(key::k%s,\n'
- ' POLICY_LEVEL_MANDATORY,\n'
- ' POLICY_SCOPE_USER,\n'
- ' %s,\n'
- ' NULL);\n'
+ ' policy_map->SetWithSource(key::k%s,\n'
+ ' POLICY_LEVEL_MANDATORY,\n'
+ ' POLICY_SCOPE_USER,\n'
+ ' %s,\n'
+ ' NULL,\n'
bartfab (slow) 2015/09/14 14:42:28 Nit: s/NULL/nullptr/
fhorschig 2015/09/16 13:52:06 Done.
+ ' '
bartfab (slow) 2015/09/14 14:42:28 Nit: Remove blank line.
fhorschig 2015/09/16 13:52:06 Done.
+ 'POLICY_SOURCE_ENTERPRISE_DEFAULT);\n'
bartfab (slow) 2015/09/14 14:42:28 1: Where is |POLICY_SOURCE_ENTERPRISE_DEFAULT| com
fhorschig 2015/09/16 13:52:06 Done.
' }\n' % (policy.name, policy.name, creation_expression))
f.write('}\n'

Powered by Google App Engine
This is Rietveld 408576698