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

Unified Diff: base/metrics/persistent_memory_allocator.h

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
Index: base/metrics/persistent_memory_allocator.h
diff --git a/base/metrics/persistent_memory_allocator.h b/base/metrics/persistent_memory_allocator.h
index f75b1c0bb69c8a2f94375d223b1624b699d9ef33..8c849b61d13c0ab5bf4f2ec558e810174e6e94b5 100644
--- a/base/metrics/persistent_memory_allocator.h
+++ b/base/metrics/persistent_memory_allocator.h
@@ -6,13 +6,14 @@
#define BASE_METRICS_PERSISTENT_MEMORY_ALLOCATOR_H_
#include <stdint.h>
+
#include <atomic>
+#include <memory>
#include "base/atomicops.h"
#include "base/base_export.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
namespace base {
@@ -321,8 +322,10 @@ class BASE_EXPORT LocalPersistentMemoryAllocator
class BASE_EXPORT SharedPersistentMemoryAllocator
: public PersistentMemoryAllocator {
public:
- SharedPersistentMemoryAllocator(scoped_ptr<SharedMemory> memory, uint64_t id,
- base::StringPiece name, bool read_only);
+ SharedPersistentMemoryAllocator(std::unique_ptr<SharedMemory> memory,
+ uint64_t id,
+ base::StringPiece name,
+ bool read_only);
~SharedPersistentMemoryAllocator() override;
SharedMemory* shared_memory() { return shared_memory_.get(); }
@@ -334,7 +337,7 @@ class BASE_EXPORT SharedPersistentMemoryAllocator
static bool IsSharedMemoryAcceptable(const SharedMemory& memory);
private:
- scoped_ptr<SharedMemory> shared_memory_;
+ std::unique_ptr<SharedMemory> shared_memory_;
DISALLOW_COPY_AND_ASSIGN(SharedPersistentMemoryAllocator);
};
@@ -346,7 +349,8 @@ class BASE_EXPORT SharedPersistentMemoryAllocator
class BASE_EXPORT FilePersistentMemoryAllocator
: public PersistentMemoryAllocator {
public:
- FilePersistentMemoryAllocator(scoped_ptr<MemoryMappedFile> file, uint64_t id,
+ FilePersistentMemoryAllocator(std::unique_ptr<MemoryMappedFile> file,
+ uint64_t id,
base::StringPiece name);
~FilePersistentMemoryAllocator() override;
@@ -357,7 +361,7 @@ class BASE_EXPORT FilePersistentMemoryAllocator
static bool IsFileAcceptable(const MemoryMappedFile& file);
private:
- scoped_ptr<MemoryMappedFile> mapped_file_;
+ std::unique_ptr<MemoryMappedFile> mapped_file_;
DISALLOW_COPY_AND_ASSIGN(FilePersistentMemoryAllocator);
};
« no previous file with comments | « base/metrics/persistent_histogram_allocator_unittest.cc ('k') | base/metrics/persistent_memory_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698