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

Unified Diff: base/json/json_parser.cc

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 | « 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_parser.cc
diff --git a/base/json/json_parser.cc b/base/json/json_parser.cc
index cd427da9ea2537fa86c103452d72505731ab6129..55d24d35e4155cac0ab72ebabd0b95802dff5a4d 100644
--- a/base/json/json_parser.cc
+++ b/base/json/json_parser.cc
@@ -901,12 +901,12 @@ std::unique_ptr<Value> JSONParser::ConsumeNumber() {
int num_int;
if (StringToInt(num_string, &num_int))
- return base::MakeUnique<FundamentalValue>(num_int);
+ return base::MakeUnique<Value>(num_int);
double num_double;
if (StringToDouble(num_string.as_string(), &num_double) &&
std::isfinite(num_double)) {
- return base::MakeUnique<FundamentalValue>(num_double);
+ return base::MakeUnique<Value>(num_double);
}
return nullptr;
@@ -942,7 +942,7 @@ std::unique_ptr<Value> JSONParser::ConsumeLiteral() {
return nullptr;
}
NextNChars(kTrueLen - 1);
- return base::MakeUnique<FundamentalValue>(true);
+ return base::MakeUnique<Value>(true);
}
case 'f': {
const char kFalseLiteral[] = "false";
@@ -953,7 +953,7 @@ std::unique_ptr<Value> JSONParser::ConsumeLiteral() {
return nullptr;
}
NextNChars(kFalseLen - 1);
- return base::MakeUnique<FundamentalValue>(false);
+ return base::MakeUnique<Value>(false);
}
case 'n': {
const char kNullLiteral[] = "null";
« 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