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

Unified Diff: base/metrics/persistent_histogram_allocator_unittest.cc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 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
« no previous file with comments | « base/metrics/persistent_histogram_allocator.cc ('k') | base/metrics/persistent_memory_allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_histogram_allocator_unittest.cc
diff --git a/base/metrics/persistent_histogram_allocator_unittest.cc b/base/metrics/persistent_histogram_allocator_unittest.cc
index 64abdec73ea340daebec78a76aa864baade67f34..922245faf523afd103774fae413dfc42075d8923 100644
--- a/base/metrics/persistent_histogram_allocator_unittest.cc
+++ b/base/metrics/persistent_histogram_allocator_unittest.cc
@@ -5,6 +5,7 @@
#include "base/metrics/persistent_histogram_allocator.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/bucket_ranges.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/persistent_memory_allocator.h"
@@ -39,7 +40,7 @@ class PersistentHistogramAllocatorTest : public testing::Test {
PersistentHistogramAllocator::ReleaseGlobalAllocatorForTesting();
}
- scoped_ptr<char[]> allocator_memory_;
+ std::unique_ptr<char[]> allocator_memory_;
PersistentMemoryAllocator* allocator_ = nullptr;
private:
@@ -96,9 +97,9 @@ TEST_F(PersistentHistogramAllocatorTest, CreateAndIterateTest) {
EXPECT_EQ(0U, allocator_->GetNextIterable(&iter, &type));
// Create a second allocator and have it access the memory of the first.
- scoped_ptr<HistogramBase> recovered;
+ std::unique_ptr<HistogramBase> recovered;
PersistentHistogramAllocator recovery(
- make_scoped_ptr(new PersistentMemoryAllocator(
+ WrapUnique(new PersistentMemoryAllocator(
allocator_memory_.get(), kAllocatorMemorySize, 0, 0, "", false)));
PersistentHistogramAllocator::Iterator histogram_iter;
recovery.CreateIterator(&histogram_iter);
« no previous file with comments | « base/metrics/persistent_histogram_allocator.cc ('k') | base/metrics/persistent_memory_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698