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

Unified Diff: net/test/spawner_communicator.cc

Issue 10035042: Rewrite base::JSONReader to be 35-40% faster, depending on the input string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments/fix Win Created 8 years, 8 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
« base/string_util.cc ('K') | « net/test/base_test_server.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/spawner_communicator.cc
diff --git a/net/test/spawner_communicator.cc b/net/test/spawner_communicator.cc
index 8b454f096dc239b7bab379a8eb711ecc79a55f67..a1fa18ac203512524dcda14c47fce0829b09011d 100644
--- a/net/test/spawner_communicator.cc
+++ b/net/test/spawner_communicator.cc
@@ -321,9 +321,7 @@ bool SpawnerCommunicator::StartServer(const std::string& arguments,
return false;
// Check whether the data returned from spawner server is JSON-formatted.
- base::JSONReader json_reader;
- scoped_ptr<base::Value> value(json_reader.JsonToValue(server_return_data,
- true, false));
+ scoped_ptr<base::Value> value(base::JSONReader::Read(server_return_data));
if (!value.get() || !value->IsType(base::Value::TYPE_DICTIONARY)) {
LOG(ERROR) << "Invalid server data: " << server_return_data.c_str();
return false;
« base/string_util.cc ('K') | « net/test/base_test_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698