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

Unified Diff: net/disk_cache/memory/mem_backend_impl.cc

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/memory/mem_backend_impl.h ('k') | net/disk_cache/memory/mem_entry_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/memory/mem_backend_impl.cc
diff --git a/net/disk_cache/memory/mem_backend_impl.cc b/net/disk_cache/memory/mem_backend_impl.cc
index 028c022f035a16c0622b6bcd57fb08376b76bb40..0ba2d3fef1c590e919289056b3fb063f8fb452a6 100644
--- a/net/disk_cache/memory/mem_backend_impl.cc
+++ b/net/disk_cache/memory/mem_backend_impl.cc
@@ -49,9 +49,9 @@ MemBackendImpl::~MemBackendImpl() {
}
// static
-scoped_ptr<Backend> MemBackendImpl::CreateBackend(int max_bytes,
- net::NetLog* net_log) {
- scoped_ptr<MemBackendImpl> cache(new MemBackendImpl(net_log));
+std::unique_ptr<Backend> MemBackendImpl::CreateBackend(int max_bytes,
+ net::NetLog* net_log) {
+ std::unique_ptr<MemBackendImpl> cache(new MemBackendImpl(net_log));
cache->SetMaxSize(max_bytes);
if (cache->Init())
return std::move(cache);
@@ -242,8 +242,8 @@ class MemBackendImpl::MemIterator final : public Backend::Iterator {
base::LinkNode<MemEntryImpl>* current_;
};
-scoped_ptr<Backend::Iterator> MemBackendImpl::CreateIterator() {
- return scoped_ptr<Backend::Iterator>(
+std::unique_ptr<Backend::Iterator> MemBackendImpl::CreateIterator() {
+ return std::unique_ptr<Backend::Iterator>(
new MemIterator(weak_factory_.GetWeakPtr()));
}
« no previous file with comments | « net/disk_cache/memory/mem_backend_impl.h ('k') | net/disk_cache/memory/mem_entry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698