Index: tools/json_schema_compiler/cpp_type_generator.py |
=================================================================== |
--- tools/json_schema_compiler/cpp_type_generator.py (revision 147600) |
+++ tools/json_schema_compiler/cpp_type_generator.py (working copy) |
@@ -127,7 +127,6 @@ |
optional. |
""" |
cpp_type = None |
- force_wrapping = False |
if prop.type_ == PropertyType.REF: |
dependency_namespace = self._ResolveTypeNamespace(prop.ref_type) |
if not dependency_namespace: |
@@ -165,17 +164,13 @@ |
cpp_type = cpp_type % self.GetType( |
prop.item_type, pad_for_generics=True) |
elif prop.type_ == PropertyType.BINARY: |
- # Since base::BinaryValue's are immutable, we wrap them in a scoped_ptr to |
- # allow them to be modified after the fact. |
- force_wrapping = True |
- cpp_type = 'base::BinaryValue' |
+ cpp_type = 'std::string' |
else: |
raise NotImplementedError(prop.type_) |
# Enums aren't wrapped because C++ won't allow it. Optional enums have a |
# NONE value generated instead. |
- if force_wrapping or (wrap_optional and prop.optional and prop.type_ != |
- PropertyType.ENUM): |
+ if wrap_optional and prop.optional and prop.type_ != PropertyType.ENUM: |
cpp_type = 'scoped_ptr<%s> ' % cpp_type |
if pad_for_generics: |
return cpp_type |