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

Unified Diff: tools/json_schema_compiler/cc_generator.py

Issue 16915006: Convert most of extensions and some other random stuff to using the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
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 772ed0792b1baf241da346aa9c246926d46933fe..5ef48f0b7671c9cac737d3665fffe97ca0d5ad90 100644
--- a/tools/json_schema_compiler/cc_generator.py
+++ b/tools/json_schema_compiler/cc_generator.py
@@ -188,7 +188,7 @@ class _Generator(object):
if type_.property_type == PropertyType.CHOICES:
for choice in type_.choices:
value_type = cpp_util.GetValueType(self._type_helper.FollowRef(choice))
- (c.Sblock('if (value.IsType(%s)) {' % value_type)
+ (c.Sblock('if (value.IsType(base::%s)) {' % value_type)
.Concat(self._GeneratePopulateVariableFromValue(
choice,
'(&value)',
@@ -645,7 +645,7 @@ class _Generator(object):
dst_var,
failure_value))
elif underlying_type.property_type == PropertyType.BINARY:
- (c.Append('if (!%(src_var)s->IsType(%(value_type)s))')
+ (c.Append('if (!%(src_var)s->IsType(base::%(value_type)s))')
.Append(' return %(failure_value)s;')
.Append('const base::BinaryValue* binary_value =')
.Append(' static_cast<const base::BinaryValue*>(%(src_var)s);')

Powered by Google App Engine
This is Rietveld 408576698