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

Unified Diff: net/disk_cache/disk_cache_test_base.h

Issue 1894733002: Change scoped_ptr to std::unique_ptr in //net/disk_cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « net/disk_cache/disk_cache.h ('k') | net/disk_cache/disk_cache_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache_test_base.h
diff --git a/net/disk_cache/disk_cache_test_base.h b/net/disk_cache/disk_cache_test_base.h
index 713bba0e6a2ab64ff27763a0af792343d4df086f..c94f5ac82ed0b3f9980d54d6899ce28bfea75a54 100644
--- a/net/disk_cache/disk_cache_test_base.h
+++ b/net/disk_cache/disk_cache_test_base.h
@@ -7,10 +7,11 @@
#include <stdint.h>
+#include <memory>
+
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/threading/thread.h"
#include "net/base/cache_type.h"
#include "net/disk_cache/disk_cache.h"
@@ -54,7 +55,7 @@ class DiskCacheTest : public PlatformTest {
private:
base::ScopedTempDir temp_dir_;
- scoped_ptr<base::MessageLoop> message_loop_;
+ std::unique_ptr<base::MessageLoop> message_loop_;
};
// Provides basic support for cache related tests.
@@ -62,13 +63,14 @@ class DiskCacheTestWithCache : public DiskCacheTest {
protected:
class TestIterator {
public:
- explicit TestIterator(scoped_ptr<disk_cache::Backend::Iterator> iterator);
+ explicit TestIterator(
+ std::unique_ptr<disk_cache::Backend::Iterator> iterator);
~TestIterator();
int OpenNextEntry(disk_cache::Entry** next_entry);
private:
- scoped_ptr<disk_cache::Backend::Iterator> iterator_;
+ std::unique_ptr<disk_cache::Backend::Iterator> iterator_;
};
DiskCacheTestWithCache();
@@ -130,7 +132,7 @@ class DiskCacheTestWithCache : public DiskCacheTest {
const base::Time end_time);
int CalculateSizeOfAllEntries();
int DoomEntriesSince(const base::Time initial_time);
- scoped_ptr<TestIterator> CreateIterator();
+ std::unique_ptr<TestIterator> CreateIterator();
void FlushQueueForTest();
void RunTaskForTest(const base::Closure& closure);
int ReadData(disk_cache::Entry* entry, int index, int offset,
@@ -163,7 +165,7 @@ class DiskCacheTestWithCache : public DiskCacheTest {
// cache_ will always have a valid object, regardless of how the cache was
// initialized. The implementation pointers can be NULL.
- scoped_ptr<disk_cache::Backend> cache_;
+ std::unique_ptr<disk_cache::Backend> cache_;
disk_cache::BackendImpl* cache_impl_;
disk_cache::SimpleBackendImpl* simple_cache_impl_;
disk_cache::MemBackendImpl* mem_cache_;
« no previous file with comments | « net/disk_cache/disk_cache.h ('k') | net/disk_cache/disk_cache_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698