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

Unified Diff: components/policy/tools/template_writers/writers/adm_writer.py

Issue 2653823006: Include 'external' policies in grit output (admx, adm, doc etc.) (Closed)
Patch Set: Whitespace fix Created 3 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
« no previous file with comments | « no previous file | components/policy/tools/template_writers/writers/adm_writer_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/tools/template_writers/writers/adm_writer.py
diff --git a/components/policy/tools/template_writers/writers/adm_writer.py b/components/policy/tools/template_writers/writers/adm_writer.py
index 5c4a3164782b6f80409346f540b428f3a1924a75..98561f4cf52c149ec8d5cbe7baf6b432a03dd097 100755
--- a/components/policy/tools/template_writers/writers/adm_writer.py
+++ b/components/policy/tools/template_writers/writers/adm_writer.py
@@ -72,7 +72,8 @@ class AdmWriter(template_writer.TemplateWriter):
'int-enum': 'DROPDOWNLIST',
'list': 'LISTBOX',
'string-enum-list': 'LISTBOX',
- 'dict': 'EDITTEXT'
+ 'dict': 'EDITTEXT',
+ 'external': 'EDITTEXT'
}
def _Escape(self, string):
@@ -122,7 +123,7 @@ class AdmWriter(template_writer.TemplateWriter):
if policy['type'] == 'int':
# The default max for NUMERIC values is 9999 which is too small for us.
builder.AddLine('MIN 0 MAX 2000000000')
- if policy['type'] in ('string', 'dict'):
+ if policy['type'] in ('string', 'dict', 'external'):
# The default max for EDITTEXT values is 1023, which is too small for
# big JSON blobs and other string policies.
builder.AddLine('MAXLEN 1000000')
@@ -140,10 +141,6 @@ class AdmWriter(template_writer.TemplateWriter):
builder.AddLine('END PART', -1)
def _WritePolicy(self, policy, key_name, builder):
- if policy['type'] == 'external':
- # This type can only be set through cloud policy.
- return
-
policy_name = self._Escape(policy['name'] + '_Policy')
self._AddGuiString(policy_name, policy['caption'])
builder.AddLine('POLICY !!%s' % policy_name, 1)
« no previous file with comments | « no previous file | components/policy/tools/template_writers/writers/adm_writer_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698