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

Unified Diff: tools/json_schema_compiler/cc_generator.py

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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/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/cc_generator.py
diff --git a/tools/json_schema_compiler/cc_generator.py b/tools/json_schema_compiler/cc_generator.py
index dcd28ce58b5f7b379969df57b6fa5ec03601eb34..c3259561beb66dfa69529824b46fcea741891d2a 100644
--- a/tools/json_schema_compiler/cc_generator.py
+++ b/tools/json_schema_compiler/cc_generator.py
@@ -650,7 +650,7 @@ class _Generator(object):
if underlying_type.property_type == PropertyType.STRING:
return 'base::MakeUnique<base::StringValue>(%s)' % var
else:
- return 'base::MakeUnique<base::FundamentalValue>(%s)' % var
+ return 'base::MakeUnique<base::Value>(%s)' % var
else:
raise NotImplementedError('Conversion of %s to base::Value not '
'implemented' % repr(type_.type_))
@@ -766,7 +766,7 @@ class _Generator(object):
if underlying_type.property_type.is_fundamental:
if is_ptr:
(c.Append('%(cpp_type)s temp;')
- .Sblock('if (!%s) {' % cpp_util.GetAsFundamentalValue(
+ .Sblock('if (!%s) {' % cpp_util.GetAsValue(
self._type_helper.FollowRef(type_), src_var, '&temp'))
.Concat(self._GenerateError(
'"\'%%(key)s\': expected ' + '%s, got " + %s' % (
@@ -781,7 +781,7 @@ class _Generator(object):
.Append(' %(dst_var)s.reset(new %(cpp_type)s(temp));')
)
else:
- (c.Sblock('if (!%s) {' % cpp_util.GetAsFundamentalValue(
+ (c.Sblock('if (!%s) {' % cpp_util.GetAsValue(
self._type_helper.FollowRef(type_),
src_var,
'&%s' % dst_var))
« no previous file with comments | « tools/ipc_fuzzer/fuzzer/fuzzer.cc ('k') | tools/json_schema_compiler/cpp_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698