summaryrefslogtreecommitdiffstats
path: root/chromium/base/files/file.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-03-11 11:32:04 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-03-18 13:40:17 +0000
commit31ccca0778db85c159634478b4ec7997f6704860 (patch)
tree3d33fc3afd9d5ec95541e1bbe074a9cf8da12a0e /chromium/base/files/file.h
parent248b70b82a40964d5594eb04feca0fa36716185d (diff)
BASELINE: Update Chromium to 80.0.3987.136
Change-Id: I98e1649aafae85ba3a83e67af00bb27ef301db7b Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'chromium/base/files/file.h')
-rw-r--r--chromium/base/files/file.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/chromium/base/files/file.h b/chromium/base/files/file.h
index d61c9f43b7b..a5ba395edbb 100644
--- a/chromium/base/files/file.h
+++ b/chromium/base/files/file.h
@@ -128,14 +128,14 @@ class BASE_EXPORT File {
#endif
// The size of the file in bytes. Undefined when is_directory is true.
- int64_t size;
+ int64_t size = 0;
// True if the file corresponds to a directory.
- bool is_directory;
+ bool is_directory = false;
// True if the file corresponds to a symbolic link. For Windows currently
// not supported and thus always false.
- bool is_symbolic_link;
+ bool is_symbolic_link = false;
// The last modified time of a file.
Time last_modified;
@@ -154,11 +154,13 @@ class BASE_EXPORT File {
File(const FilePath& path, uint32_t flags);
// Takes ownership of |platform_file| and sets async to false.
+ explicit File(ScopedPlatformFile platform_file);
explicit File(PlatformFile platform_file);
// Takes ownership of |platform_file| and sets async to the given value.
// This constructor exists because on Windows you can't check if platform_file
// is async or not.
+ File(ScopedPlatformFile platform_file, bool async);
File(PlatformFile platform_file, bool async);
// Creates an object with a specific error_details code.
@@ -363,6 +365,13 @@ class BASE_EXPORT File {
// Converts an error value to a human-readable form. Used for logging.
static std::string ErrorToString(Error error);
+#if defined(OS_POSIX) || defined(OS_FUCHSIA)
+ // Wrapper for stat() or stat64().
+ static int Stat(const char* path, stat_wrapper_t* sb);
+ static int Fstat(int fd, stat_wrapper_t* sb);
+ static int Lstat(const char* path, stat_wrapper_t* sb);
+#endif
+
private:
friend class FileTracing::ScopedTrace;
@@ -381,9 +390,9 @@ class BASE_EXPORT File {
// Object tied to the lifetime of |this| that enables/disables tracing.
FileTracing::ScopedEnabler trace_enabler_;
- Error error_details_;
- bool created_;
- bool async_;
+ Error error_details_ = FILE_ERROR_FAILED;
+ bool created_ = false;
+ bool async_ = false;
DISALLOW_COPY_AND_ASSIGN(File);
};