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

Unified Diff: tools/json_schema_compiler/cpp_type_generator.py

Issue 10198005: Implement handling of binary data in JSON schema compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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_util.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 a8719af05c0a3c108b8138b2653df8162dc26e38..0a1768be035b302e0b2368253bd41481b64efc79 100644
--- a/tools/json_schema_compiler/cpp_type_generator.py
+++ b/tools/json_schema_compiler/cpp_type_generator.py
@@ -139,7 +139,7 @@ class CppTypeGenerator(object):
elif prop.type_ == PropertyType.ENUM:
cpp_type = cpp_util.Classname(prop.name)
elif prop.type_ == PropertyType.ADDITIONAL_PROPERTIES:
- cpp_type = 'DictionaryValue'
+ cpp_type = 'base::DictionaryValue'
elif prop.type_ == PropertyType.ANY:
cpp_type = any_helper.ANY_CLASS
elif prop.type_ == PropertyType.OBJECT:
@@ -152,6 +152,8 @@ class CppTypeGenerator(object):
cpp_type = 'std::vector<%s> '
cpp_type = cpp_type % self.GetType(
prop.item_type, pad_for_generics=True)
+ elif prop.type_ == PropertyType.BINARY:
+ cpp_type = 'base::BinaryValue'
else:
raise NotImplementedError(prop.type_)
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | tools/json_schema_compiler/cpp_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698