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

Unified Diff: base/files/important_file_writer.cc

Issue 1023103002: Let ImportantFileWriter Use fdatasync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« base/files/file_posix.cc ('K') | « base/files/file_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/important_file_writer.cc
diff --git a/base/files/important_file_writer.cc b/base/files/important_file_writer.cc
index 47b0b09e8938b1ef21ffe6e45e10a71aa97587e5..629ac948e38bf27129e120851e9db7de018d66c7 100644
--- a/base/files/important_file_writer.cc
+++ b/base/files/important_file_writer.cc
@@ -90,7 +90,7 @@ bool ImportantFileWriter::WriteFileAtomically(const FilePath& path,
CHECK_LE(data.length(), static_cast<size_t>(kint32max));
int bytes_written = tmp_file.Write(0, data.data(),
static_cast<int>(data.length()));
- bool flush_success = tmp_file.Flush();
+ bool flush_success = tmp_file.FlushData();
rvargas (doing something else) 2015/03/20 18:56:05 Incidentally, crbug.com/468046 is about doing _mor
hashimoto 2015/03/20 19:38:57 Hmm, ImportantFileWriter's slowness is already a p
hashimoto 2015/03/20 19:40:30 Oops, wrong bug number. crbug.com/418627 is the co
rvargas (doing something else) 2015/03/20 21:43:00 Shouldn't we profile it from the field? The fact t
tmp_file.Close();
if (bytes_written < static_cast<int>(data.length())) {
« base/files/file_posix.cc ('K') | « base/files/file_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698