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

Unified Diff: net/disk_cache/blockfile/backend_impl_v3.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/blockfile/backend_impl_v3.h ('k') | net/disk_cache/blockfile/backend_worker_v3.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/backend_impl_v3.cc
diff --git a/net/disk_cache/blockfile/backend_impl_v3.cc b/net/disk_cache/blockfile/backend_impl_v3.cc
index ae90bd96aef2ba3f3d12a792f025f21824d83fc9..e326e8ae2697eae5b2db7b550ec240ba54e74c88 100644
--- a/net/disk_cache/blockfile/backend_impl_v3.cc
+++ b/net/disk_cache/blockfile/backend_impl_v3.cc
@@ -685,8 +685,9 @@ class BackendImplV3::IteratorImpl : public Backend::Iterator {
void* data_;
};
-scoped_ptr<Backend::Iterator> BackendImplV3::CreateIterator() {
- return scoped_ptr<Backend::Iterator>(new IteratorImpl(GetBackgroundQueue()));
+std::unique_ptr<Backend::Iterator> BackendImplV3::CreateIterator() {
+ return std::unique_ptr<Backend::Iterator>(
+ new IteratorImpl(GetBackgroundQueue()));
}
void BackendImplV3::GetStats(StatsItems* stats) {
@@ -795,7 +796,7 @@ bool BackendImplV3::InitStats() {
if (!file)
return false;
- scoped_ptr<char[]> data(new char[size]);
+ std::unique_ptr<char[]> data(new char[size]);
size_t offset = address.start_block() * address.BlockSize() +
kBlockHeaderSize;
if (!file->Read(data.get(), size, offset))
@@ -810,7 +811,7 @@ bool BackendImplV3::InitStats() {
void BackendImplV3::StoreStats() {
int size = stats_.StorageSize();
- scoped_ptr<char[]> data(new char[size]);
+ std::unique_ptr<char[]> data(new char[size]);
Addr address;
size = stats_.SerializeStats(data.get(), size, &address);
DCHECK(size);
@@ -1389,7 +1390,7 @@ bool BackendImplV3::CheckIndex() {
mask_ = data_->header.table_len - 1;
// Load the table into memory with a single read.
- scoped_ptr<char[]> buf(new char[current_size]);
+ std::unique_ptr<char[]> buf(new char[current_size]);
return index_->Read(buf.get(), current_size, 0);
}
@@ -1526,8 +1527,8 @@ class BackendImplV3::NotImplementedIterator : public Backend::Iterator {
}
};
-scoped_ptr<Backend::Iterator> BackendImplV3::CreateIterator() {
- return scoped_ptr<Iterator>(new NotImplementedIterator());
+std::unique_ptr<Backend::Iterator> BackendImplV3::CreateIterator() {
+ return std::unique_ptr<Iterator>(new NotImplementedIterator());
}
void BackendImplV3::GetStats(StatsItems* stats) {
« no previous file with comments | « net/disk_cache/blockfile/backend_impl_v3.h ('k') | net/disk_cache/blockfile/backend_worker_v3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698