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

Unified Diff: tools/grit/grit/format/policy_templates/writers/adm_writer.py

Issue 6176005: Support int-typed policies in policy template generator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comment Created 9 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: tools/grit/grit/format/policy_templates/writers/adm_writer.py
diff --git a/tools/grit/grit/format/policy_templates/writers/adm_writer.py b/tools/grit/grit/format/policy_templates/writers/adm_writer.py
index 3067282205c5a41546501a02451199b8521bbc18..c3df88cd74b4f08e9775664ecb32fd6520c625a0 100644
--- a/tools/grit/grit/format/policy_templates/writers/adm_writer.py
+++ b/tools/grit/grit/format/policy_templates/writers/adm_writer.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -21,6 +21,7 @@ class AdmWriter(template_writer.TemplateWriter):
TYPE_TO_INPUT = {
'string': 'EDITTEXT',
+ 'int': 'NUMERIC',
'string-enum': 'DROPDOWNLIST',
'int-enum': 'DROPDOWNLIST',
'list': 'LISTBOX'}
@@ -28,7 +29,7 @@ class AdmWriter(template_writer.TemplateWriter):
def _AddGuiString(self, name, value):
# Escape newlines in the value.
- value = value.replace('\n','\\n')
+ value = value.replace('\n', '\\n')
line = '%s="%s"' % (name, value)
self.str_list.append(line)
« no previous file with comments | « chrome/app/policy/policy_templates.json ('k') | tools/grit/grit/format/policy_templates/writers/adm_writer_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698