summaryrefslogtreecommitdiffstats
path: root/base/metrics
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 /base/metrics
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 'base/metrics')
-rw-r--r--base/metrics/statistics_recorder_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/metrics/statistics_recorder_unittest.cc b/base/metrics/statistics_recorder_unittest.cc
index e653bf3..d26df69 100644
--- a/base/metrics/statistics_recorder_unittest.cc
+++ b/base/metrics/statistics_recorder_unittest.cc
@@ -262,7 +262,7 @@ TEST_F(StatisticsRecorderTest, ToJSON) {
// Check for valid JSON.
scoped_ptr<Value> root;
- root.reset(JSONReader::Read(json));
+ root.reset(JSONReader::DeprecatedRead(json));
ASSERT_TRUE(root.get());
DictionaryValue* root_dict = NULL;
@@ -287,7 +287,7 @@ TEST_F(StatisticsRecorderTest, ToJSON) {
std::string query("TestHistogram2");
json = StatisticsRecorder::ToJSON(query);
- root.reset(JSONReader::Read(json));
+ root.reset(JSONReader::DeprecatedRead(json));
ASSERT_TRUE(root.get());
ASSERT_TRUE(root->GetAsDictionary(&root_dict));