diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-01-04 14:17:57 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-01-05 10:05:06 +0000 |
commit | 39d357e3248f80abea0159765ff39554affb40db (patch) | |
tree | aba0e6bfb76de0244bba0f5fdbd64b830dd6e621 /chromium/base/files/file.h | |
parent | 87778abf5a1f89266f37d1321b92a21851d8244d (diff) |
BASELINE: Update Chromium to 55.0.2883.105
And updates ninja to 1.7.2
Change-Id: I20d43c737f82764d857ada9a55586901b18b9243
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/base/files/file.h')
-rw-r--r-- | chromium/base/files/file.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/chromium/base/files/file.h b/chromium/base/files/file.h index ae2bd1b61bd..885e00b9577 100644 --- a/chromium/base/files/file.h +++ b/chromium/base/files/file.h @@ -252,6 +252,16 @@ class BASE_EXPORT File { // Instructs the filesystem to flush the file to disk. (POSIX: fsync, Windows: // FlushFileBuffers). + // Calling Flush() does not guarantee file integrity and thus is not a valid + // substitute for file integrity checks and recovery codepaths for malformed + // files. It can also be *really* slow, so avoid blocking on Flush(), + // especially please don't block shutdown on Flush(). + // Latency percentiles of Flush() across all platforms as of July 2016: + // 50 % > 5 ms + // 10 % > 58 ms + // 1 % > 357 ms + // 0.1 % > 1.8 seconds + // 0.01 % > 7.6 seconds bool Flush(); // Updates the file times. @@ -290,7 +300,7 @@ class BASE_EXPORT File { // object that was created or initialized with this flag will have unlinked // the underlying file when it was created or opened. On Windows, the // underlying file is deleted when the last handle to it is closed. - File Duplicate(); + File Duplicate() const; bool async() const { return async_; } @@ -310,10 +320,6 @@ class BASE_EXPORT File { // traversal ('..') components. void DoInitialize(const FilePath& path, uint32_t flags); - // TODO(tnagel): Reintegrate into Flush() once histogram isn't needed anymore, - // cf. issue 473337. - bool DoFlush(); - void SetPlatformFile(PlatformFile file); #if defined(OS_WIN) |