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

Issue 7695014: ImportantFileWriter: Flush the data before closing the (Closed)

Created:
9 years, 4 months ago by rvargas (doing something else)
Modified:
9 years, 3 months ago
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

ImportantFileWriter: Flush the data before closing the temporary file so that the subsequent rename always operates with data in disk. BUG=89356 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98704

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -7 lines) Patch
M chrome/common/important_file_writer.cc View 2 chunks +22 lines, -7 lines 8 comments Download

Messages

Total messages: 9 (0 generated)
rvargas (doing something else)
9 years, 4 months ago (2011-08-22 23:18:37 UTC) #1
Scott Hess - ex-Googler
I think it does the right thing, though. http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc#newcode46 chrome/common/important_file_writer.cc:46: base::CreatePlatformFile(tmp_file_path, ...
9 years, 4 months ago (2011-08-23 00:54:38 UTC) #2
rvargas (doing something else)
Thanks. http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc#newcode46 chrome/common/important_file_writer.cc:46: base::CreatePlatformFile(tmp_file_path, flags, NULL, NULL); On 2011/08/23 00:54:38, shess ...
9 years, 4 months ago (2011-08-23 01:41:52 UTC) #3
Scott Hess - ex-Googler
LGTM http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc#newcode46 chrome/common/important_file_writer.cc:46: base::CreatePlatformFile(tmp_file_path, flags, NULL, NULL); On 2011/08/23 01:41:52, rvargas ...
9 years, 4 months ago (2011-08-23 19:23:57 UTC) #4
Scott Hess - ex-Googler
http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc#newcode54 chrome/common/important_file_writer.cc:54: tmp_file, 0, data_.data(), static_cast<int>(data_.length())); BTW ... AFAICT the POSIX ...
9 years, 4 months ago (2011-08-23 19:27:17 UTC) #5
rvargas (doing something else)
Thanks. http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc#newcode54 chrome/common/important_file_writer.cc:54: tmp_file, 0, data_.data(), static_cast<int>(data_.length())); On 2011/08/23 19:27:17, shess ...
9 years, 4 months ago (2011-08-23 23:36:58 UTC) #6
Scott Hess - ex-Googler
On 2011/08/23 23:36:58, rvargas wrote: > Thanks. > > http://codereview.chromium.org/7695014/diff/1/chrome/common/important_file_writer.cc > File chrome/common/important_file_writer.cc (right): > ...
9 years, 4 months ago (2011-08-23 23:59:12 UTC) #7
Nico
Note from the peanut gallery: Would it help if ReplaceFile() used MoveFileEx() with MOVEFILE_WRITE_THROUGH on ...
9 years, 3 months ago (2011-09-10 05:45:10 UTC) #8
Scott Hess - ex-Googler
9 years, 3 months ago (2011-09-10 05:49:31 UTC) #9
On 2011/09/10 05:45:10, Nico wrote:
> Note from the peanut gallery: Would it help if ReplaceFile() used MoveFileEx()
> with MOVEFILE_WRITE_THROUGH on win?
> 
> http://msdn.microsoft.com/en-us/library/aa365240%28v=vs.85%29.aspx

The part about it applying to "copy and delete" probably means that this applies
to moves between partitions.  This file is explicitly stored on the target
partition, so should be a straight rename.

Powered by Google App Engine
This is Rietveld 408576698