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

Unified Diff: components/filesystem/file_impl.cc

Issue 1935863002: mojo: Fix leveldb unittests by making fs::Directories cloneable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Gyp continues to exist. 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/file_impl.h ('k') | components/filesystem/file_system_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/file_impl.cc
diff --git a/components/filesystem/file_impl.cc b/components/filesystem/file_impl.cc
index 13ebced6ff58ff747752f14409eb985cd9bf7648..ee73031f99e499e92351b478b21a1b071a48a427 100644
--- a/components/filesystem/file_impl.cc
+++ b/components/filesystem/file_impl.cc
@@ -14,6 +14,7 @@
#include "base/logging.h"
#include "build/build_config.h"
#include "components/filesystem/lock_table.h"
+#include "components/filesystem/shared_temp_dir.h"
#include "components/filesystem/util.h"
#include "mojo/common/common_type_converters.h"
#include "mojo/platform_handle/platform_handle_functions.h"
@@ -34,10 +35,12 @@ const size_t kMaxReadSize = 1 * 1024 * 1024; // 1 MB.
FileImpl::FileImpl(mojo::InterfaceRequest<File> request,
const base::FilePath& path,
uint32_t flags,
+ scoped_refptr<SharedTempDir> temp_dir,
scoped_refptr<LockTable> lock_table)
: binding_(this, std::move(request)),
file_(path, flags),
path_(path),
+ temp_dir_(std::move(temp_dir)),
lock_table_(std::move(lock_table)) {
DCHECK(file_.IsValid());
}
@@ -45,10 +48,12 @@ FileImpl::FileImpl(mojo::InterfaceRequest<File> request,
FileImpl::FileImpl(mojo::InterfaceRequest<File> request,
const base::FilePath& path,
base::File file,
+ scoped_refptr<SharedTempDir> temp_dir,
scoped_refptr<LockTable> lock_table)
: binding_(this, std::move(request)),
file_(std::move(file)),
path_(path),
+ temp_dir_(std::move(temp_dir)),
lock_table_(std::move(lock_table)) {
DCHECK(file_.IsValid());
}
@@ -297,7 +302,8 @@ void FileImpl::Dup(mojo::InterfaceRequest<File> file,
}
if (file.is_pending())
- new FileImpl(std::move(file), path_, std::move(new_file), lock_table_);
+ new FileImpl(std::move(file), path_, std::move(new_file), temp_dir_,
+ lock_table_);
callback.Run(FileError::OK);
}
« no previous file with comments | « components/filesystem/file_impl.h ('k') | components/filesystem/file_system_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698