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

Unified Diff: tools/json_schema_compiler/cpp_type_generator.py

Issue 10639020: Switch the downloads API over to IDL/json_schema_compiler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 5 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 | « tools/json_schema_compiler/cc_generator.py ('k') | tools/json_schema_compiler/cpp_type_generator_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/cpp_type_generator.py
diff --git a/tools/json_schema_compiler/cpp_type_generator.py b/tools/json_schema_compiler/cpp_type_generator.py
index 55cb36e497059b6e8ec3fdcdd8aee353d46bc19e..28967b06fcbb8102d5675b774ed616b3a63bab57 100644
--- a/tools/json_schema_compiler/cpp_type_generator.py
+++ b/tools/json_schema_compiler/cpp_type_generator.py
@@ -7,7 +7,6 @@ from model import PropertyType
import any_helper
import cpp_util
import schema_util
-import string
class CppTypeGenerator(object):
"""Manages the types of properties and provides utilities for getting the
@@ -191,9 +190,10 @@ class CppTypeGenerator(object):
c.Append('typedef std::string %s;' % type_name)
elif namespace.types[type_].type_ == PropertyType.ARRAY:
c.Append('typedef std::vector<%(item_type)s> %(name)s;')
- c.Substitute({'name': type_name, 'item_type':
- self.GetType(namespace.types[type_].item_type,
- wrap_optional=True)})
+ c.Substitute({
+ 'name': type_name,
+ 'item_type': self.GetType(namespace.types[type_].item_type,
+ wrap_optional=True)})
else:
c.Append('struct %s;' % type_name)
c.Append('}')
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | tools/json_schema_compiler/cpp_type_generator_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698