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

Unified Diff: tools/grit/grit/format/policy_templates/writers/doc_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/doc_writer.py
diff --git a/tools/grit/grit/format/policy_templates/writers/doc_writer.py b/tools/grit/grit/format/policy_templates/writers/doc_writer.py
index 7e410bcdcfc1bca1e86e9c7cbba2a3ac4dc47a8e..80e788049226e1ae3a628e7d774d4f870de489c0 100644
--- a/tools/grit/grit/format/policy_templates/writers/doc_writer.py
+++ b/tools/grit/grit/format/policy_templates/writers/doc_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.
@@ -257,7 +257,7 @@ class DocWriter(xml_formatted_writer.XMLFormattedWriter):
raise Exception('Expected boolean value.')
elif policy_type == 'string':
self.AddText(parent, '"%s"' % example_value)
- elif policy_type == 'int-enum':
+ elif policy_type in ('int', 'int-enum'):
self.AddText(
parent,
'0x%08x (Windows), %d (Linux/Mac)' % (example_value, example_value))
@@ -502,6 +502,7 @@ class DocWriter(xml_formatted_writer.XMLFormattedWriter):
# Human-readable names of types.
self._TYPE_MAP = {
'string': 'String (REG_SZ)',
+ 'int': 'Integer (REG_DWORD)',
'main': 'Boolean (REG_DWORD)',
'int-enum': 'Integer (REG_DWORD)',
'string-enum': 'String (REG_SZ)',

Powered by Google App Engine
This is Rietveld 408576698