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

Issue 3599011: Add truncate and cancel for FileWriter; write and tests will come in later CL... (Closed)

Created:
10 years, 2 months ago by ericu
Modified:
9 years, 7 months ago
Reviewers:
kinuko, michaeln
CC:
chromium-reviews, jam, ben+cc_chromium.org, darin-cc_chromium.org, stuartmorgan+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Add truncate and cancel for FileWriter; write and more tests will come in later CLs. This CL also contains a fair amount of plumbing for the write call itself. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61462

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 6

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 2

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 8

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -91 lines) Patch
M base/file_util_proxy.h View 1 2 3 2 chunks +11 lines, -2 lines 0 comments Download
M base/file_util_proxy.cc View 1 2 3 4 chunks +50 lines, -7 lines 0 comments Download
M chrome/browser/file_system/file_system_dispatcher_host.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/common/file_system/file_system_dispatcher.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/common/file_system/webfilesystem_callback_dispatcher.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/file_system/webfilesystem_callback_dispatcher.cc View 1 2 3 3 chunks +12 lines, -25 lines 0 comments Download
M webkit/fileapi/file_system_callback_dispatcher.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_operation.h View 1 2 3 4 3 chunks +25 lines, -6 lines 0 comments Download
M webkit/fileapi/file_system_operation.cc View 1 2 3 14 chunks +55 lines, -46 lines 0 comments Download
M webkit/fileapi/file_system_operation_unittest.cc View 5 6 2 chunks +58 lines, -0 lines 0 comments Download
M webkit/glue/plugins/pepper_file_system.cc View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M webkit/tools/test_shell/simple_file_system.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
ericu
10 years, 2 months ago (2010-10-02 01:53:53 UTC) #1
kinuko
http://codereview.chromium.org/3599011/diff/11001/12001 File base/file_util_proxy.cc (right): http://codereview.chromium.org/3599011/diff/11001/12001#newcode612 base/file_util_proxy.cc:612: base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_TRUNCATE, Doesn't this (PLATFORM_FILE_TRUNCATE) truncate the file ...
10 years, 2 months ago (2010-10-02 04:43:16 UTC) #2
kinuko
http://codereview.chromium.org/3599011/diff/11001/12001 File base/file_util_proxy.cc (right): http://codereview.chromium.org/3599011/diff/11001/12001#newcode585 base/file_util_proxy.cc:585: class RelayTruncate : public RelayWithStatusCallback { It might be ...
10 years, 2 months ago (2010-10-04 00:41:00 UTC) #3
ericu
Also cleaned up some lint errors. http://codereview.chromium.org/3599011/diff/11001/12001 File base/file_util_proxy.cc (right): http://codereview.chromium.org/3599011/diff/11001/12001#newcode585 base/file_util_proxy.cc:585: class RelayTruncate : ...
10 years, 2 months ago (2010-10-04 18:04:47 UTC) #4
kinuko
LGTM Would be really really great if we could add a unittest for Truncate in ...
10 years, 2 months ago (2010-10-04 23:04:55 UTC) #5
kinuko
http://codereview.chromium.org/3599011/diff/31001/32009 File webkit/fileapi/file_system_operation.h (right): http://codereview.chromium.org/3599011/diff/31001/32009#newcode24 webkit/fileapi/file_system_operation.h:24: class URLRequestContext; nit: are they for coming code?
10 years, 2 months ago (2010-10-04 23:05:21 UTC) #6
ericu
I'll add some unit tests and post again shortly. http://codereview.chromium.org/3599011/diff/31001/32009 File webkit/fileapi/file_system_operation.h (right): http://codereview.chromium.org/3599011/diff/31001/32009#newcode24 webkit/fileapi/file_system_operation.h:24: ...
10 years, 2 months ago (2010-10-04 23:13:29 UTC) #7
ericu
Added a unit test for truncate. I'll add cancel tests when I've got write in.
10 years, 2 months ago (2010-10-05 00:26:27 UTC) #8
kinuko
LGTM http://codereview.chromium.org/3599011/diff/52001/6012 File webkit/fileapi/file_system_operation_unittest.cc (right): http://codereview.chromium.org/3599011/diff/52001/6012#newcode565 webkit/fileapi/file_system_operation_unittest.cc:565: nit: no need for this empty line? http://codereview.chromium.org/3599011/diff/52001/6012#newcode592 ...
10 years, 2 months ago (2010-10-05 00:37:24 UTC) #9
ericu
10 years, 2 months ago (2010-10-05 00:40:32 UTC) #10
http://codereview.chromium.org/3599011/diff/52001/6012
File webkit/fileapi/file_system_operation_unittest.cc (right):

http://codereview.chromium.org/3599011/diff/52001/6012#newcode565
webkit/fileapi/file_system_operation_unittest.cc:565: 
On 2010/10/05 00:37:26, Kinuko Yasuda wrote:
> nit: no need for this empty line?

Done.

http://codereview.chromium.org/3599011/diff/52001/6012#newcode592
webkit/fileapi/file_system_operation_unittest.cc:592: int buffer_size = 100;
On 2010/10/05 00:37:26, Kinuko Yasuda wrote:
> nit: this is not used.

Removed.

http://codereview.chromium.org/3599011/diff/52001/6012#newcode595
webkit/fileapi/file_system_operation_unittest.cc:595: for (int i=0; i < length;
++i) {
On 2010/10/05 00:37:26, Kinuko Yasuda wrote:
> nit: s/i=0/i = 0/

Done.

http://codereview.chromium.org/3599011/diff/52001/6012#newcode613
webkit/fileapi/file_system_operation_unittest.cc:613: for (int i=0; i < length;
++i)
On 2010/10/05 00:37:26, Kinuko Yasuda wrote:
> nit: s/i=0/i = 0/

Done.

Powered by Google App Engine
This is Rietveld 408576698