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

Unified Diff: tools/json_schema_compiler/cc_generator.py

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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/ipc_fuzzer/fuzzer/fuzzer.cc ('k') | tools/json_schema_compiler/test/any_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/cc_generator.py
diff --git a/tools/json_schema_compiler/cc_generator.py b/tools/json_schema_compiler/cc_generator.py
index b653a9c83bc862e8a2443cfe051fbd16448c0185..26cab3635727ac31dac9973e08aa0d9366275bcf 100644
--- a/tools/json_schema_compiler/cc_generator.py
+++ b/tools/json_schema_compiler/cc_generator.py
@@ -567,7 +567,7 @@ class _Generator(object):
var: variable or variable*
- E.g for std::string, generate new base::StringValue(var)
+ E.g for std::string, generate new base::Value(var)
"""
c = Code()
underlying_type = self._type_helper.FollowRef(type_)
@@ -631,7 +631,7 @@ class _Generator(object):
maybe_namespace = ''
if type_.property_type == PropertyType.REF:
maybe_namespace = '%s::' % underlying_type.namespace.unix_name
- return 'base::MakeUnique<base::StringValue>(%sToString(%s))' % (
+ return 'base::MakeUnique<base::Value>(%sToString(%s))' % (
maybe_namespace, var)
elif underlying_type.property_type == PropertyType.BINARY:
if is_ptr:
@@ -648,7 +648,7 @@ class _Generator(object):
if is_ptr:
var = '*%s' % var
if underlying_type.property_type == PropertyType.STRING:
- return 'base::MakeUnique<base::StringValue>(%s)' % var
+ return 'base::MakeUnique<base::Value>(%s)' % var
else:
return 'base::MakeUnique<base::Value>(%s)' % var
else:
« no previous file with comments | « tools/ipc_fuzzer/fuzzer/fuzzer.cc ('k') | tools/json_schema_compiler/test/any_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698