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

Unified Diff: components/filesystem/directory_impl.cc

Issue 1918083002: Convert //components/[f-n]* from scoped_ptr to std::unique_ptr (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 | « components/filesystem/directory_impl.h ('k') | components/filesystem/file_system_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/directory_impl.cc
diff --git a/components/filesystem/directory_impl.cc b/components/filesystem/directory_impl.cc
index c80731d7df09c66a478685c377fd3a155d0cca1b..986526b035f7ff6a7921f664942e141962db36ea 100644
--- a/components/filesystem/directory_impl.cc
+++ b/components/filesystem/directory_impl.cc
@@ -11,7 +11,6 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
#include "components/filesystem/file_impl.h"
#include "components/filesystem/lock_table.h"
@@ -25,7 +24,7 @@ namespace filesystem {
DirectoryImpl::DirectoryImpl(mojo::InterfaceRequest<Directory> request,
base::FilePath directory_path,
- scoped_ptr<base::ScopedTempDir> temp_dir,
+ std::unique_ptr<base::ScopedTempDir> temp_dir,
scoped_refptr<LockTable> lock_table)
: binding_(this, std::move(request)),
directory_path_(directory_path),
@@ -156,8 +155,7 @@ void DirectoryImpl::OpenDirectory(const mojo::String& raw_path,
}
if (directory.is_pending())
- new DirectoryImpl(std::move(directory), path,
- scoped_ptr<base::ScopedTempDir>(), lock_table_);
+ new DirectoryImpl(std::move(directory), path, nullptr, lock_table_);
callback.Run(FileError::OK);
}
@@ -291,7 +289,7 @@ void DirectoryImpl::ReadEntireFile(const mojo::String& raw_path,
std::string contents;
const int kBufferSize = 1 << 16;
- scoped_ptr<char[]> buf(new char[kBufferSize]);
+ std::unique_ptr<char[]> buf(new char[kBufferSize]);
int len;
while ((len = base_file.ReadAtCurrentPos(buf.get(), kBufferSize)) > 0)
contents.append(buf.get(), len);
« no previous file with comments | « components/filesystem/directory_impl.h ('k') | components/filesystem/file_system_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698