| Index: base/metrics/sparse_histogram_unittest.cc
|
| diff --git a/base/metrics/sparse_histogram_unittest.cc b/base/metrics/sparse_histogram_unittest.cc
|
| index 42c116786df2a375bc6719b5b0feb395edf51431..0946a67b766329296ecbc2ade2f454fd387eecf2 100644
|
| --- a/base/metrics/sparse_histogram_unittest.cc
|
| +++ b/base/metrics/sparse_histogram_unittest.cc
|
| @@ -47,13 +47,12 @@ class SparseHistogramTest : public testing::TestWithParam<bool> {
|
| }
|
|
|
| void InitializeStatisticsRecorder() {
|
| - StatisticsRecorder::ResetForTesting();
|
| - statistics_recorder_ = new StatisticsRecorder();
|
| + DCHECK(!statistics_recorder_);
|
| + statistics_recorder_.reset(new StatisticsRecorder());
|
| }
|
|
|
| void UninitializeStatisticsRecorder() {
|
| - delete statistics_recorder_;
|
| - statistics_recorder_ = NULL;
|
| + statistics_recorder_.reset();
|
| }
|
|
|
| void CreatePersistentMemoryAllocator() {
|
| @@ -78,7 +77,7 @@ class SparseHistogramTest : public testing::TestWithParam<bool> {
|
|
|
| const bool use_persistent_histogram_allocator_;
|
|
|
| - StatisticsRecorder* statistics_recorder_;
|
| + std::unique_ptr<StatisticsRecorder> statistics_recorder_;
|
| PersistentMemoryAllocator* allocator_ = nullptr;
|
|
|
| private:
|
|
|