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

Unified Diff: chrome/browser/automation/testing_automation_provider.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: '' 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
Index: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index c5a5ba7d17365762daedd864260463b381920369..d7cdcb790d89b212eb11d4f591d53133c72befd8 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -2128,10 +2128,8 @@ void TestingAutomationProvider::GetBlockedPopupCount(int handle, int* count) {
void TestingAutomationProvider::SendJSONRequest(int handle,
const std::string& json_request,
IPC::Message* reply_message) {
- scoped_ptr<Value> values;
- base::JSONReader reader;
std::string error;
- values.reset(reader.ReadAndReturnError(json_request,
+ scoped_ptr<Value> values(base::JSONReader::ReadAndReturnError(json_request,
base::JSON_ALLOW_TRAILING_COMMAS, NULL, &error));
if (!error.empty()) {
AutomationJSONReply(this, reply_message).SendError(error);

Powered by Google App Engine
This is Rietveld 408576698