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

Unified Diff: base/json/json_reader.cc

Issue 7649006: more changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another typo Created 9 years, 4 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 | « no previous file | base/json/json_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_reader.cc
diff --git a/base/json/json_reader.cc b/base/json/json_reader.cc
index b28699543336249e37e2b740a56114d3baf3ff51..9207f4d47fe1641aaa5fd04ce06104060b8fb47b 100644
--- a/base/json/json_reader.cc
+++ b/base/json/json_reader.cc
@@ -219,15 +219,15 @@ Value* JSONReader::BuildValue(bool is_root) {
return NULL;
case Token::NULL_TOKEN:
- node.reset(Value::CreateNullValue());
+ node.reset(NullValue());
break;
case Token::BOOL_TRUE:
- node.reset(Value::CreateBooleanValue(true));
+ node.reset(TrueValue());
break;
case Token::BOOL_FALSE:
- node.reset(Value::CreateBooleanValue(false));
+ node.reset(FalseValue());
break;
case Token::NUMBER:
@@ -392,12 +392,12 @@ Value* JSONReader::DecodeNumber(const Token& token) {
int num_int;
if (StringToInt(WideToUTF8(num_string), &num_int))
- return Value::CreateIntegerValue(num_int);
+ return NumberValue::New(num_int);
double num_double;
if (StringToDouble(WideToUTF8(num_string), &num_double) &&
base::IsFinite(num_double))
- return Value::CreateDoubleValue(num_double);
+ return NumberValue::New(num_double);
return NULL;
}
@@ -505,7 +505,7 @@ Value* JSONReader::DecodeString(const Token& token) {
decoded_str.push_back(c);
}
}
- return Value::CreateStringValue(WideToUTF16Hack(decoded_str));
+ return StringValue::New(WideToUTF16Hack(decoded_str));
}
JSONReader::Token JSONReader::ParseToken() {
« no previous file with comments | « no previous file | base/json/json_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698