summaryrefslogtreecommitdiffstats
path: root/chromeos/timezone
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 /chromeos/timezone
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 'chromeos/timezone')
-rw-r--r--chromeos/timezone/timezone_request.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chromeos/timezone/timezone_request.cc b/chromeos/timezone/timezone_request.cc
index 0a41f9f..de0d7c1 100644
--- a/chromeos/timezone/timezone_request.cc
+++ b/chromeos/timezone/timezone_request.cc
@@ -175,8 +175,9 @@ bool ParseServerResponse(const GURL& server_url,
// 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) {
PrintTimeZoneError(server_url, "JSONReader failed: " + error_msg, timezone);
RecordUmaEvent(TIMEZONE_REQUEST_EVENT_RESPONSE_MALFORMED);