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

Unified Diff: tools/grit/grit/format/policy_templates/writers/reg_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/reg_writer.py
diff --git a/tools/grit/grit/format/policy_templates/writers/reg_writer.py b/tools/grit/grit/format/policy_templates/writers/reg_writer.py
index 5aea50e1a6a6aea1bc360d232268d69f0f90aef5..6032c48d3af39e224bd13297a4317689e5972146 100644
--- a/tools/grit/grit/format/policy_templates/writers/reg_writer.py
+++ b/tools/grit/grit/format/policy_templates/writers/reg_writer.py
@@ -66,11 +66,11 @@ class RegWriter(template_writer.TemplateWriter):
example_value_str = '"' + escaped_str + '"'
elif policy['type'] == 'main':
if example_value == True:
- example_value_str = 'dword:1'
+ example_value_str = 'dword:00000001'
else:
- example_value_str = 'dword:0'
- elif policy['type'] == 'int-enum':
- example_value_str = 'dword:%d' % example_value
+ example_value_str = 'dword:00000000'
+ elif policy['type'] in ('int', 'int-enum'):
+ example_value_str = 'dword:%08x' % example_value
elif policy['type'] == 'string-enum':
example_value_str = '"%s"' % example_value
else:

Powered by Google App Engine
This is Rietveld 408576698