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

Unified Diff: grit/format/policy_templates/writers/reg_writer.py

Issue 352163003: Added support for string-enum-list. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: Review feedback. Created 6 years, 6 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: grit/format/policy_templates/writers/reg_writer.py
diff --git a/grit/format/policy_templates/writers/reg_writer.py b/grit/format/policy_templates/writers/reg_writer.py
index beb15904f13e68aad6bfd9c2351ce4b8e4453329..dcb70f44355c09c57a2d10d9ec6995015e8aebaf 100644
--- a/grit/format/policy_templates/writers/reg_writer.py
+++ b/grit/format/policy_templates/writers/reg_writer.py
@@ -47,7 +47,7 @@ class RegWriter(template_writer.TemplateWriter):
list.sort() methods to sort policies.
See TemplateWriter.SortPoliciesGroupsFirst for usage.
'''
- is_list = policy['type'] == 'list'
+ is_list = policy['type'] in ('list', 'string-enum-list')
# Lists come after regular policies.
return (is_list, policy['name'])
@@ -57,7 +57,7 @@ class RegWriter(template_writer.TemplateWriter):
if policy['type'] == 'external':
# This type can only be set through cloud policy.
return
- elif policy['type'] == 'list':
+ elif policy['type'] in ('list', 'string-enum-list'):
self._StartBlock(key, policy['name'], list)
i = 1
for item in example_value:

Powered by Google App Engine
This is Rietveld 408576698