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

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

Issue 2627083002: cros: Ensure quick unlock is disabled by default for enterprise policy. (Closed)
Patch Set: Add policy generation support 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
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 4da66966d30eb364f950fb7865a27fd50f500bd7..af30e0ab9eec211cae115e3ee917edcc010a6e22 100755
--- a/components/policy/tools/generate_policy_source.py
+++ b/components/policy/tools/generate_policy_source.py
@@ -746,6 +746,9 @@ def _WritePolicyConstantSource(policies, os, f, riskTags):
elif policy.policy_type == 'Type::STRING':
creation_expression = 'new base::StringValue("%s")' %\
policy.enterprise_default
+ elif (policy.policy_type == 'Type::LIST' and
pastarmovj 2017/01/23 23:38:12 If I get this right this code will only work for e
Thiemo Nagel 2017/01/24 10:27:35 +1 to that.
jdufault 2017/01/25 01:32:43 I've extended the logic, but I don't see a relativ
pastarmovj 2017/01/25 15:28:05 I think the easiest (and complete) way to test thi
+ policy.enterprise_default == []):
+ creation_expression = 'new base::ListValue()'
else:
raise RuntimeError('Type %s of policy %s is not supported at '
'enterprise defaults' % (policy.policy_type,

Powered by Google App Engine
This is Rietveld 408576698