Index: components/filesystem/file_system_impl.cc |
diff --git a/components/filesystem/file_system_impl.cc b/components/filesystem/file_system_impl.cc |
index 5fa0e6366c345cc629464b814683cdbff19d1dd8..5338909dd1cabc81893082a2f5fcf97ed1efe4ec 100644 |
--- a/components/filesystem/file_system_impl.cc |
+++ b/components/filesystem/file_system_impl.cc |
@@ -17,17 +17,16 @@ |
#include "build/build_config.h" |
#include "components/filesystem/directory_impl.h" |
#include "components/filesystem/lock_table.h" |
+#include "mojo/public/cpp/bindings/strong_binding.h" |
#include "services/shell/public/cpp/identity.h" |
#include "url/gurl.h" |
namespace filesystem { |
FileSystemImpl::FileSystemImpl(const shell::Identity& remote_identity, |
- mojom::FileSystemRequest request, |
base::FilePath persistent_dir, |
scoped_refptr<LockTable> lock_table) |
: remote_application_name_(remote_identity.name()), |
- binding_(this, std::move(request)), |
lock_table_(std::move(lock_table)), |
persistent_dir_(persistent_dir) {} |
@@ -35,7 +34,7 @@ FileSystemImpl::~FileSystemImpl() { |
} |
void FileSystemImpl::OpenTempDirectory( |
- mojo::InterfaceRequest<mojom::Directory> directory, |
+ mojom::DirectoryRequest directory, |
const OpenTempDirectoryCallback& callback) { |
// Set only if the |DirectoryImpl| will own a temporary directory. |
std::unique_ptr<base::ScopedTempDir> temp_dir(new base::ScopedTempDir); |
@@ -44,8 +43,9 @@ void FileSystemImpl::OpenTempDirectory( |
base::FilePath path = temp_dir->path(); |
scoped_refptr<SharedTempDir> shared_temp_dir = |
new SharedTempDir(std::move(temp_dir)); |
- new DirectoryImpl( |
- std::move(directory), path, std::move(shared_temp_dir), lock_table_); |
+ mojo::MakeStrongBinding(base::MakeUnique<DirectoryImpl>( |
+ path, std::move(shared_temp_dir), lock_table_), |
+ std::move(directory)); |
callback.Run(mojom::FileError::OK); |
} |
@@ -60,8 +60,9 @@ void FileSystemImpl::OpenPersistentFileSystem( |
scoped_refptr<SharedTempDir> shared_temp_dir = |
new SharedTempDir(std::move(temp_dir)); |
- new DirectoryImpl( |
- std::move(directory), path, std::move(shared_temp_dir), lock_table_); |
+ mojo::MakeStrongBinding(base::MakeUnique<DirectoryImpl>( |
+ path, std::move(shared_temp_dir), lock_table_), |
+ std::move(directory)); |
callback.Run(mojom::FileError::OK); |
} |