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

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

Issue 2275963004: Apply default policy values also on non-ChromeOS
Patch Set: move down into UserCloudPolicyManager[ChromeOS] Created 4 years, 4 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/cloud/user_cloud_policy_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 04445612e51e84db03ddbd97a2e572c1794141c3..f47ea345f30c01e72c9025ba819df9ba39f1216a 100755
--- a/components/policy/tools/generate_policy_source.py
+++ b/components/policy/tools/generate_policy_source.py
@@ -317,10 +317,8 @@ def _WritePolicyConstantHeader(policies, os, f, riskTags):
'configuration resides.\n'
'extern const wchar_t kRegistryChromePolicyKey[];\n')
- f.write('#if defined (OS_CHROMEOS)\n'
- '// Sets default values for enterprise users.\n'
+ f.write('// Sets default values for enterprise users.\n'
'void SetEnterpriseUsersDefaults(PolicyMap* policy_map);\n'
- '#endif\n'
'\n'
'// Returns the PolicyDetails for |policy| if |policy| is a known\n'
'// Chrome policy, otherwise returns NULL.\n'
@@ -731,8 +729,7 @@ def _WritePolicyConstantSource(policies, os, f, riskTags):
' return &kChromeSchemaData;\n'
'}\n\n')
- f.write('#if defined (OS_CHROMEOS)\n'
- 'void SetEnterpriseUsersDefaults(PolicyMap* policy_map) {\n')
+ f.write('void SetEnterpriseUsersDefaults(PolicyMap* policy_map) {\n')
for policy in policies:
if policy.has_enterprise_default:
@@ -758,8 +755,7 @@ def _WritePolicyConstantSource(policies, os, f, riskTags):
' NULL);\n'
' }\n' % (policy.name, policy.name, creation_expression))
- f.write('}\n'
- '#endif\n\n')
+ f.write('}\n\n')
f.write('const PolicyDetails* GetChromePolicyDetails('
'const std::string& policy) {\n'
« no previous file with comments | « components/policy/core/common/cloud/user_cloud_policy_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698