summaryrefslogtreecommitdiff
path: root/chromium/base/files/file.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-08-14 11:38:45 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-08-14 17:16:47 +0000
commit3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859 (patch)
tree43cc572ba067417c7341db81f71ae7cc6e0fcc3e /chromium/base/files/file.cc
parentf61ab1ac7f855cd281809255c0aedbb1895e1823 (diff)
downloadqtwebengine-chromium-3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859.tar.gz
BASELINE: Update chromium to 45.0.2454.40
Change-Id: Id2121d9f11a8fc633677236c65a3e41feef589e4 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'chromium/base/files/file.cc')
-rw-r--r--chromium/base/files/file.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/chromium/base/files/file.cc b/chromium/base/files/file.cc
index 58f80c52322..47b9f88f188 100644
--- a/chromium/base/files/file.cc
+++ b/chromium/base/files/file.cc
@@ -52,7 +52,7 @@ File::File(Error error_details)
File::File(RValue other)
: file_(other.object->TakePlatformFile()),
- path_(other.object->path_),
+ tracing_path_(other.object->tracing_path_),
error_details_(other.object->error_details()),
created_(other.object->created()),
async_(other.object->async_) {
@@ -63,11 +63,20 @@ File::~File() {
Close();
}
+// static
+File File::CreateForAsyncHandle(PlatformFile platform_file) {
+ File file(platform_file);
+ // It would be nice if we could validate that |platform_file| was opened with
+ // FILE_FLAG_OVERLAPPED on Windows but this doesn't appear to be possible.
+ file.async_ = true;
+ return file.Pass();
+}
+
File& File::operator=(RValue other) {
if (this != other.object) {
Close();
SetPlatformFile(other.object->TakePlatformFile());
- path_ = other.object->path_;
+ tracing_path_ = other.object->tracing_path_;
error_details_ = other.object->error_details();
created_ = other.object->created();
async_ = other.object->async_;
@@ -81,9 +90,10 @@ void File::Initialize(const FilePath& path, uint32 flags) {
error_details_ = FILE_ERROR_ACCESS_DENIED;
return;
}
- path_ = path;
+ if (FileTracing::IsCategoryEnabled())
+ tracing_path_ = path;
SCOPED_FILE_TRACE("Initialize");
- DoInitialize(flags);
+ DoInitialize(path, flags);
}
#endif