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

Unified Diff: net/disk_cache/simple/simple_index_file.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/simple/simple_index_file.h ('k') | net/disk_cache/simple/simple_index_file_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_index_file.cc
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index c23d64e6bd8402adfa4b2f6e37cf3d1fe5856d70..ad3fe60ae0b000c79cfc71e0efb892e0908ba0ba 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -189,7 +189,7 @@ void SimpleIndexFile::SyncWriteToDisk(net::CacheType cache_type,
const base::FilePath& cache_directory,
const base::FilePath& index_filename,
const base::FilePath& temp_index_filename,
- scoped_ptr<base::Pickle> pickle,
+ std::unique_ptr<base::Pickle> pickle,
const base::TimeTicks& start_time,
bool app_on_background) {
DCHECK_EQ(index_filename.DirName().value(),
@@ -274,7 +274,7 @@ void SimpleIndexFile::WriteToDisk(const SimpleIndex::EntrySet& entry_set,
bool app_on_background,
const base::Closure& callback) {
IndexMetadata index_metadata(entry_set.size(), cache_size);
- scoped_ptr<base::Pickle> pickle = Serialize(index_metadata, entry_set);
+ std::unique_ptr<base::Pickle> pickle = Serialize(index_metadata, entry_set);
base::Closure task =
base::Bind(&SimpleIndexFile::SyncWriteToDisk,
cache_type_, cache_directory_, index_file_, temp_index_file_,
@@ -365,10 +365,10 @@ void SimpleIndexFile::SyncLoadFromDisk(const base::FilePath& index_filename,
}
// static
-scoped_ptr<base::Pickle> SimpleIndexFile::Serialize(
+std::unique_ptr<base::Pickle> SimpleIndexFile::Serialize(
const SimpleIndexFile::IndexMetadata& index_metadata,
const SimpleIndex::EntrySet& entries) {
- scoped_ptr<base::Pickle> pickle(
+ std::unique_ptr<base::Pickle> pickle(
new base::Pickle(sizeof(SimpleIndexFile::PickleHeader)));
index_metadata.Serialize(pickle.get());
« no previous file with comments | « net/disk_cache/simple/simple_index_file.h ('k') | net/disk_cache/simple/simple_index_file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698