summaryrefslogtreecommitdiff
path: root/chromium/tools/json_schema_compiler
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-11-21 14:09:57 +0100
committerAndras Becsi <andras.becsi@digia.com>2013-11-29 15:14:36 +0100
commiteb32ba6f51d0c21d58cd7d89785285ff8fa64624 (patch)
tree2c7c940e1dbee81b89d935626110816b494aa32c /chromium/tools/json_schema_compiler
parent9427c1a0222ebd67efef1a2c7990a0fa5c9aac84 (diff)
downloadqtwebengine-chromium-eb32ba6f51d0c21d58cd7d89785285ff8fa64624.tar.gz
Update chromium to branch 1599.
Change-Id: I04e775a946a208bb4500d3b722bcb05c82b9d7cb Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/tools/json_schema_compiler')
-rw-r--r--chromium/tools/json_schema_compiler/cc_generator.py4
-rw-r--r--chromium/tools/json_schema_compiler/util.cc8
2 files changed, 6 insertions, 6 deletions
diff --git a/chromium/tools/json_schema_compiler/cc_generator.py b/chromium/tools/json_schema_compiler/cc_generator.py
index d7d565e3846..2c55b1ee3ef 100644
--- a/chromium/tools/json_schema_compiler/cc_generator.py
+++ b/chromium/tools/json_schema_compiler/cc_generator.py
@@ -449,7 +449,7 @@ class _Generator(object):
var: variable or variable*
- E.g for std::string, generate new base::StringValue(var)
+ E.g for std::string, generate base::Value::CreateStringValue(var)
"""
underlying_type = self._type_helper.FollowRef(type_)
if (underlying_type.property_type == PropertyType.CHOICES or
@@ -466,7 +466,7 @@ class _Generator(object):
vardot = '(%s).' % var
return '%sDeepCopy()' % vardot
elif underlying_type.property_type == PropertyType.ENUM:
- return 'new base::StringValue(ToString(%s))' % var
+ return 'base::Value::CreateStringValue(ToString(%s))' % var
elif underlying_type.property_type == PropertyType.BINARY:
if is_ptr:
vardot = var + '->'
diff --git a/chromium/tools/json_schema_compiler/util.cc b/chromium/tools/json_schema_compiler/util.cc
index d0e77659e6a..c03d0764667 100644
--- a/chromium/tools/json_schema_compiler/util.cc
+++ b/chromium/tools/json_schema_compiler/util.cc
@@ -45,19 +45,19 @@ bool GetItemFromList(const base::ListValue& from, int index,
}
void AddItemToList(const int from, base::ListValue* out) {
- out->Append(new base::FundamentalValue(from));
+ out->Append(base::Value::CreateIntegerValue(from));
}
void AddItemToList(const bool from, base::ListValue* out) {
- out->Append(new base::FundamentalValue(from));
+ out->Append(base::Value::CreateBooleanValue(from));
}
void AddItemToList(const double from, base::ListValue* out) {
- out->Append(new base::FundamentalValue(from));
+ out->Append(base::Value::CreateDoubleValue(from));
}
void AddItemToList(const std::string& from, base::ListValue* out) {
- out->Append(new base::StringValue(from));
+ out->Append(base::Value::CreateStringValue(from));
}
void AddItemToList(const linked_ptr<base::Value>& from,