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

Unified Diff: chrome/common/net/gaia/oauth2_mint_token_flow.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/common/net/gaia/oauth2_mint_token_flow.cc
diff --git a/chrome/common/net/gaia/oauth2_mint_token_flow.cc b/chrome/common/net/gaia/oauth2_mint_token_flow.cc
index c39bbaa74d5dcb536c84a470f67ad98ee59c4b6a..ca5391f9b45947d3d171109dd2c306335f12d6dd 100644
--- a/chrome/common/net/gaia/oauth2_mint_token_flow.cc
+++ b/chrome/common/net/gaia/oauth2_mint_token_flow.cc
@@ -184,8 +184,7 @@ void OAuth2MintTokenFlow::ProcessApiCallSuccess(
// internal error.
std::string response_body;
source->GetResponseAsString(&response_body);
- base::JSONReader reader;
- scoped_ptr<base::Value> value(reader.Read(response_body, false));
+ scoped_ptr<base::Value> value(base::JSONReader::Read(response_body));
DictionaryValue* dict = NULL;
if (!value.get() || !value->GetAsDictionary(&dict)) {
ReportFailure(GoogleServiceAuthError::FromConnectionError(101));

Powered by Google App Engine
This is Rietveld 408576698