summaryrefslogtreecommitdiffstats
path: root/content/browser/speech
diff options
context:
space:
mode:
authorestade <estade@chromium.org>2015-05-22 09:30:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-22 16:30:52 +0000
commitb09312bb5ad1bffaad8a09deea395f1aef2053df (patch)
treeea13602ed858503180cd725d1afe6a4ce73a2bd9 /content/browser/speech
parent2d381b0799c9fbbd33fbfa5ccf6610794d454f71 (diff)
downloadchromium_src-b09312bb5ad1bffaad8a09deea395f1aef2053df.zip
chromium_src-b09312bb5ad1bffaad8a09deea395f1aef2053df.tar.gz
chromium_src-b09312bb5ad1bffaad8a09deea395f1aef2053df.tar.bz2
Use scoped_ptrs in JSONReader::Read functions.
There are many callers, so all could not be updated at once. The old version is renamed to JSONReader::DeprecatedRead, and a new version of JSONReader::Read that returns scoped_ptr takes its place. Much of this patch was generated with sed. Some callsites of the form scoped_ptr<Value> value(Read()); have been updated to scoped_ptr<Value> value = Read(); but most Read() calls are simply converted to DeprecatedRead. Actually updating them is a TODO. BUG=none Review URL: https://codereview.chromium.org/1136643005 Cr-Commit-Position: refs/heads/master@{#331120}
Diffstat (limited to 'content/browser/speech')
-rw-r--r--content/browser/speech/google_one_shot_remote_engine.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/content/browser/speech/google_one_shot_remote_engine.cc b/content/browser/speech/google_one_shot_remote_engine.cc
index 77f5c2c..92e4cb3 100644
--- a/content/browser/speech/google_one_shot_remote_engine.cc
+++ b/content/browser/speech/google_one_shot_remote_engine.cc
@@ -47,8 +47,9 @@ bool ParseServerResponse(const std::string& response_body,
// Parse the response, ignoring comments.
std::string error_msg;
- scoped_ptr<base::Value> response_value(base::JSONReader::ReadAndReturnError(
- response_body, base::JSON_PARSE_RFC, NULL, &error_msg));
+ scoped_ptr<base::Value> response_value(
+ base::JSONReader::DeprecatedReadAndReturnError(
+ response_body, base::JSON_PARSE_RFC, NULL, &error_msg));
if (response_value == NULL) {
LOG(WARNING) << "ParseServerResponse: JSONReader failed : " << error_msg;
return false;