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

Issue 10986045: Flush at the end of local file writing in FileWriter API. (Closed)

Created:
8 years, 2 months ago by kinaba
Modified:
8 years, 2 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, oshima+watch_chromium.org, tzik+watch_chromium.org, jam, joi+watch-content_chromium.org, marja+watch_chromium.org, darin-cc_chromium.org, rdsmith+dwatch_chromium.org, kinuko+watch, stevenjb+watch_chromium.org, tbarzic, benwells
Visibility:
Public.

Description

Flush at the end of local file writing in FileWriter API. This CL ensures the written content is flushed physically before fileWriter.write() invokes the "onwriteend" event, for native local files. Remote files (Google Drive files in Chrome OS) nor FileSystem API files (in PERSISTENT or TEMPORARY storage) aren't affected. The summary of the changes: * Call Flush() before the final callback. (webkit/fileapi/file_writer_delegate.cc) * Delegate Flush() to net::FileStream::Flush (webkit/fileapi/local_file_stream_writer.cc) * No-op implementation for Flush(). (webkit/fileapi/sanbox_file_stream_writer.cc) (webkit/chromeos/fileapi/remote_file_stream_writer.cc) * Implementation of asynchronous Flush. (net/base/file_stream_{posix,win}.cc) * Other files are just for reflecting the rename Flush -> FlushSync. BUG=144790 R=willchan@chromium.org,kinuko@chromium.org,benjhayden@chromium.org TBR=marja@chromium.org TEST=out/Debug/browser_tests --gtest_filter='*FileSystemApi*' TEST=./webkit/tools/layout_tests/run_webkit_tests.sh fast/filesystem TEST=Manual steps reported in the issue. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=159454

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rebase. #

Patch Set 3 : Windows impl. #

Patch Set 4 : Clean up. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+243 lines, -17 lines) Patch
M chrome/browser/sessions/session_backend.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/base_file.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/base/file_stream.h View 1 chunk +23 lines, -2 lines 0 comments Download
M net/base/file_stream.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M net/base/file_stream_posix.h View 1 chunk +2 lines, -1 line 0 comments Download
M net/base/file_stream_posix.cc View 2 chunks +36 lines, -1 line 0 comments Download
M net/base/file_stream_win.h View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M net/base/file_stream_win.cc View 1 2 3 chunks +48 lines, -1 line 0 comments Download
M net/base/mock_file_stream.h View 1 chunk +2 lines, -1 line 0 comments Download
M net/base/mock_file_stream.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M webkit/chromeos/fileapi/remote_file_stream_writer.h View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/chromeos/fileapi/remote_file_stream_writer.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/fileapi/file_stream_writer.h View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M webkit/fileapi/file_writer_delegate.h View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M webkit/fileapi/file_writer_delegate.cc View 1 2 3 4 chunks +38 lines, -3 lines 0 comments Download
M webkit/fileapi/local_file_stream_writer.h View 2 chunks +6 lines, -1 line 0 comments Download
M webkit/fileapi/local_file_stream_writer.cc View 2 chunks +35 lines, -0 lines 0 comments Download
M webkit/fileapi/sandbox_file_stream_writer.h View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/fileapi/sandbox_file_stream_writer.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
kinuko
http://codereview.chromium.org/10986045/diff/1/webkit/fileapi/file_writer_delegate.cc File webkit/fileapi/file_writer_delegate.cc (right): http://codereview.chromium.org/10986045/diff/1/webkit/fileapi/file_writer_delegate.cc#newcode210 webkit/fileapi/file_writer_delegate.cc:210: } Do we need to do this when error ...
8 years, 2 months ago (2012-09-26 08:34:08 UTC) #1
kinaba
http://codereview.chromium.org/10986045/diff/1/webkit/fileapi/file_writer_delegate.cc File webkit/fileapi/file_writer_delegate.cc (right): http://codereview.chromium.org/10986045/diff/1/webkit/fileapi/file_writer_delegate.cc#newcode210 webkit/fileapi/file_writer_delegate.cc:210: } On 2012/09/26 08:34:08, kinuko wrote: > Do we ...
8 years, 2 months ago (2012-09-28 11:15:25 UTC) #2
kinaba
Hi, could you review the CL, specifically on the following areas? +willchan: net/base changes. +kinuko: ...
8 years, 2 months ago (2012-09-28 11:26:13 UTC) #3
willchan no longer on Chromium
+paivanof paivanof: Can you take a quick look to make sure this will be consistent ...
8 years, 2 months ago (2012-09-28 21:32:30 UTC) #4
pivanof
On 2012/09/28 21:32:30, willchan wrote: > +paivanof > > paivanof: Can you take a quick ...
8 years, 2 months ago (2012-09-28 22:21:05 UTC) #5
kinaba
On 2012/09/28 22:21:05, pivanof wrote: > I wonder is usage of WeakPtrFactory really necessary in ...
8 years, 2 months ago (2012-09-29 00:25:06 UTC) #6
willchan no longer on Chromium
LGTM If it's M23 blocking, feel free to call it out and I'll review it ...
8 years, 2 months ago (2012-09-29 00:30:28 UTC) #7
pivanof
On 2012/09/29 00:25:06, kinaba wrote: > On 2012/09/28 22:21:05, pivanof wrote: > If it > ...
8 years, 2 months ago (2012-09-29 00:45:19 UTC) #8
kinaba
@willchan, thanks. Adding reviewers +benjhayden for content/browser/download/OWNERS +marja for chrome/browser/sessions/OWNERS Could you take a brief ...
8 years, 2 months ago (2012-09-29 00:52:28 UTC) #9
kinaba
On 2012/09/29 00:45:19, pivanof wrote: > On 2012/09/29 00:25:06, kinaba wrote: > > On 2012/09/28 ...
8 years, 2 months ago (2012-09-29 00:54:38 UTC) #10
benjhayden
LGTM It looks like you renamed Flush() to FlushSync() and added a new Flush() which ...
8 years, 2 months ago (2012-09-29 16:15:24 UTC) #11
pivanof
On 2012/09/29 16:15:24, benjhayden_chromium wrote: > It looks like you renamed Flush() to FlushSync() and ...
8 years, 2 months ago (2012-09-29 16:36:35 UTC) #12
Randy Smith (Not in Mondays)
On 2012/09/29 16:36:35, pivanof wrote: > On 2012/09/29 16:15:24, benjhayden_chromium wrote: > > It looks ...
8 years, 2 months ago (2012-09-30 18:17:40 UTC) #13
pivanof
On 2012/09/30 18:17:40, rdsmith wrote: > On 2012/09/29 16:36:35, pivanof wrote: > > On 2012/09/29 ...
8 years, 2 months ago (2012-09-30 21:26:51 UTC) #14
kinuko
webkit/fileapi/* lgtm
8 years, 2 months ago (2012-10-01 03:03:02 UTC) #15
kinaba
On 2012/09/30 18:17:40, rdsmith wrote: > ... and Close() because some consumers may care > ...
8 years, 2 months ago (2012-10-01 04:37:30 UTC) #16
kinaba
On 2012/10/01 03:03:02, kinuko wrote: > webkit/fileapi/* lgtm Thanks, Kinuko. Please allow me to go ...
8 years, 2 months ago (2012-10-01 05:06:38 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinaba@chromium.org/10986045/10001
8 years, 2 months ago (2012-10-01 05:06:46 UTC) #18
commit-bot: I haz the power
Retried try job too often for step(s) compile
8 years, 2 months ago (2012-10-01 05:12:01 UTC) #19
marja
post-commit LGTM (chrome/browser/sessions/session_backend.cc)
8 years, 2 months ago (2012-10-01 07:33:05 UTC) #20
kinaba
8 years, 2 months ago (2012-10-01 07:33:54 UTC) #21
On 2012/10/01 07:33:05, marja wrote:
> post-commit LGTM (chrome/browser/sessions/session_backend.cc)

Thank you very much!

Powered by Google App Engine
This is Rietveld 408576698