summaryrefslogtreecommitdiff
path: root/chromium/base/files/file.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-28 15:28:34 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-28 13:54:51 +0000
commit2a19c63448c84c1805fb1a585c3651318bb86ca7 (patch)
treeeb17888e8531aa6ee5e85721bd553b832a7e5156 /chromium/base/files/file.cc
parentb014812705fc80bff0a5c120dfcef88f349816dc (diff)
downloadqtwebengine-chromium-2a19c63448c84c1805fb1a585c3651318bb86ca7.tar.gz
BASELINE: Update Chromium to 69.0.3497.70
Change-Id: I2b7b56e4e7a8b26656930def0d4575dc32b900a0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/base/files/file.cc')
-rw-r--r--chromium/base/files/file.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/chromium/base/files/file.cc b/chromium/base/files/file.cc
index 1a4ee370311..e8934b1cdc3 100644
--- a/chromium/base/files/file.cc
+++ b/chromium/base/files/file.cc
@@ -36,11 +36,13 @@ File::File(const FilePath& path, uint32_t flags)
}
#endif
-File::File(PlatformFile platform_file)
+File::File(PlatformFile platform_file) : File(platform_file, false) {}
+
+File::File(PlatformFile platform_file, bool async)
: file_(platform_file),
error_details_(FILE_OK),
created_(false),
- async_(false) {
+ async_(async) {
#if defined(OS_POSIX) || defined(OS_FUCHSIA)
DCHECK_GE(platform_file, -1);
#endif
@@ -64,15 +66,6 @@ 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;
-}
-
File& File::operator=(File&& other) {
Close();
SetPlatformFile(other.TakePlatformFile());