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

Issue 19596003: Remove CloseFile from FileSystem. (Closed)

Created:
7 years, 5 months ago by hidehiko
Modified:
7 years, 5 months ago
Reviewers:
hashimoto, kinaba
CC:
chromium-reviews, nkostylev+watch_chromium.org, tfarina, oshima+watch_chromium.org, tzik+watch_chromium.org, kinuko+watch, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Remove CloseFile from FileSystem. CloseFile has a potential issue, which may close a file different from opened one. To avoid such a case, by this CL, OpenFile starts to return a closure, which should be called on the file closing. This is the same technique used in fileapi implementation. BUG=259184 TEST=Ran unit_tests and tested manually. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213366

Patch Set 1 #

Total comments: 12

Patch Set 2 : #

Total comments: 2

Patch Set 3 : Rebase #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -471 lines) Patch
M chrome/browser/chromeos/drive/async_file_util.cc View 1 2 3 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/drive/dummy_file_system.h View 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/chromeos/drive/fake_file_system.h View 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/chromeos/drive/fake_file_system.cc View 2 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/chromeos/drive/file_system.h View 6 chunks +2 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/drive/file_system.cc View 6 chunks +3 lines, -18 lines 0 comments Download
D chrome/browser/chromeos/drive/file_system/close_file_operation.h View 1 chunk +0 lines, -70 lines 0 comments Download
D chrome/browser/chromeos/drive/file_system/close_file_operation.cc View 1 chunk +0 lines, -83 lines 0 comments Download
D chrome/browser/chromeos/drive/file_system/close_file_operation_unittest.cc View 1 chunk +0 lines, -105 lines 0 comments Download
M chrome/browser/chromeos/drive/file_system/open_file_operation.h View 1 2 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/drive/file_system/open_file_operation.cc View 1 6 chunks +28 lines, -13 lines 0 comments Download
M chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc View 1 2 3 14 chunks +62 lines, -29 lines 0 comments Download
M chrome/browser/chromeos/drive/file_system_interface.h View 1 2 3 4 chunks +13 lines, -12 lines 0 comments Download
M chrome/browser/chromeos/drive/file_system_unittest.cc View 1 2 3 3 chunks +5 lines, -15 lines 0 comments Download
M chrome/browser/chromeos/drive/file_write_helper.h View 1 2 3 3 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/drive/file_write_helper.cc View 1 2 3 3 chunks +6 lines, -24 lines 0 comments Download
M chrome/browser/chromeos/drive/file_write_helper_unittest.cc View 3 chunks +19 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/drive/fileapi_worker.h View 1 2 3 3 chunks +8 lines, -12 lines 0 comments Download
M chrome/browser/chromeos/drive/fileapi_worker.cc View 1 2 3 4 chunks +13 lines, -20 lines 0 comments Download
M chrome/browser/chromeos/drive/webkit_file_stream_writer_impl.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/chromeos/drive/webkit_file_stream_writer_impl.cc View 1 2 3 5 chunks +16 lines, -21 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
hidehiko
Thank you for your review in advance, # Sorry for a large CL, but I ...
7 years, 5 months ago (2013-07-23 07:26:40 UTC) #1
kinaba
https://codereview.chromium.org/19596003/diff/1/chrome/browser/chromeos/drive/file_system/open_file_operation.cc File chrome/browser/chromeos/drive/file_system/open_file_operation.cc (right): https://codereview.chromium.org/19596003/diff/1/chrome/browser/chromeos/drive/file_system/open_file_operation.cc#newcode164 chrome/browser/chromeos/drive/file_system/open_file_operation.cc:164: weak_ptr_factory_.GetWeakPtr(), resource_id)); I think the callback in the case ...
7 years, 5 months ago (2013-07-23 10:58:52 UTC) #2
hashimoto
nit: Please remove the "WIP" line from the change description. https://codereview.chromium.org/19596003/diff/1/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc File chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc (right): https://codereview.chromium.org/19596003/diff/1/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc#newcode55 ...
7 years, 5 months ago (2013-07-23 11:24:58 UTC) #3
hidehiko
Thank you for your review. PTAL? Done to remove WIP. https://codereview.chromium.org/19596003/diff/1/chrome/browser/chromeos/drive/file_system/open_file_operation.cc File chrome/browser/chromeos/drive/file_system/open_file_operation.cc (right): https://codereview.chromium.org/19596003/diff/1/chrome/browser/chromeos/drive/file_system/open_file_operation.cc#newcode164 ...
7 years, 5 months ago (2013-07-23 14:32:24 UTC) #4
kinaba
lgtm
7 years, 5 months ago (2013-07-23 22:46:25 UTC) #5
hashimoto
lgtm with a nit https://codereview.chromium.org/19596003/diff/10001/chrome/browser/chromeos/drive/file_system_interface.h File chrome/browser/chromeos/drive/file_system_interface.h (right): https://codereview.chromium.org/19596003/diff/10001/chrome/browser/chromeos/drive/file_system_interface.h#newcode107 chrome/browser/chromeos/drive/file_system_interface.h:107: const base::Closure& on_close_callback)> nit: Why ...
7 years, 5 months ago (2013-07-24 03:43:56 UTC) #6
hidehiko
Thank you for your review. Sending to CQ. https://codereview.chromium.org/19596003/diff/10001/chrome/browser/chromeos/drive/file_system_interface.h File chrome/browser/chromeos/drive/file_system_interface.h (right): https://codereview.chromium.org/19596003/diff/10001/chrome/browser/chromeos/drive/file_system_interface.h#newcode107 chrome/browser/chromeos/drive/file_system_interface.h:107: const ...
7 years, 5 months ago (2013-07-24 04:49:45 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hidehiko@chromium.org/19596003/27001
7 years, 5 months ago (2013-07-24 04:50:11 UTC) #8
commit-bot: I haz the power
7 years, 5 months ago (2013-07-24 07:29:34 UTC) #9
Message was sent while issue was closed.
Change committed as 213366

Powered by Google App Engine
This is Rietveld 408576698