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

Unified Diff: tools/json_schema_compiler/cpp_type_generator.py

Issue 10815024: Revert 147594 - NaCl: Remove two uses of '#include "nacl/nacl_log.h"' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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') | no next file » | 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
===================================================================
--- 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
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698