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

Unified Diff: base/files/file_posix.cc

Issue 2171833002: Add some words of caution to File::Flush(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove PlatformFile.FlushTime histogram. Created 4 years, 5 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
Index: base/files/file_posix.cc
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index 532ae3f0a935fbc111f2b92bb6a41217287f0e50..3d2d54a6632edb7d560c89f81292585663e8e480 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -511,9 +511,10 @@ void File::DoInitialize(const FilePath& path, uint32_t flags) {
}
#endif // !defined(OS_NACL)
-bool File::DoFlush() {
+bool File::Flush() {
ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
+ SCOPED_FILE_TRACE("Flush");
#if defined(OS_NACL)
NOTIMPLEMENTED(); // NaCl doesn't implement fsync.

Powered by Google App Engine
This is Rietveld 408576698