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

Unified Diff: components/filesystem/file_system_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
Index: components/filesystem/file_system_impl.cc
diff --git a/components/filesystem/file_system_impl.cc b/components/filesystem/file_system_impl.cc
index 9b308bb8e8831e79efd2810a842ae16ed3f35f3a..750a2491c915e8fd89fdca9975836140dd0a115a 100644
--- a/components/filesystem/file_system_impl.cc
+++ b/components/filesystem/file_system_impl.cc
@@ -5,6 +5,8 @@
#include "components/filesystem/file_system_impl.h"
#include <stddef.h>
+
+#include <memory>
#include <utility>
#include "base/files/file_path.h"
@@ -12,7 +14,6 @@
#include "base/files/scoped_file.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/directory_impl.h"
#include "components/filesystem/lock_table.h"
@@ -37,7 +38,7 @@ void FileSystemImpl::OpenTempDirectory(
mojo::InterfaceRequest<Directory> directory,
const OpenTempDirectoryCallback& callback) {
// Set only if the |DirectoryImpl| will own a temporary directory.
- scoped_ptr<base::ScopedTempDir> temp_dir(new base::ScopedTempDir);
+ std::unique_ptr<base::ScopedTempDir> temp_dir(new base::ScopedTempDir);
CHECK(temp_dir->CreateUniqueTempDir());
base::FilePath path = temp_dir->path();
@@ -49,7 +50,7 @@ void FileSystemImpl::OpenTempDirectory(
void FileSystemImpl::OpenPersistentFileSystem(
mojo::InterfaceRequest<Directory> directory,
const OpenPersistentFileSystemCallback& callback) {
- scoped_ptr<base::ScopedTempDir> temp_dir;
+ std::unique_ptr<base::ScopedTempDir> temp_dir;
base::FilePath path = persistent_dir_;
if (!base::PathExists(path))
base::CreateDirectory(path);
« no previous file with comments | « components/filesystem/file_system_app.cc ('k') | components/filesystem/public/cpp/prefs/filesystem_json_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698