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

Issue 10541113: Notify CloseFile from Pepper to FileSystem. (Closed)

Created:
8 years, 6 months ago by kinaba
Modified:
8 years, 5 months ago
CC:
chromium-reviews, jochen+watch-content_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, oshima+watch_chromium.org, kinuko+watch, stevenjb+watch_chromium.org, zel
Visibility:
Public.

Description

Notify CloseFile from Pepper to FileSystem. Remote filesystems need to know when a plugin finished updating a local cache file in order to commit the change. This CL is to wire the notification of file close between the two components. Since writable OpenFile is not yet implemented for remote filesystem, the CL itself should not cause behavior change. BUG=132236 TEST=browser_tests --gtest_filter='*FileIO*' Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=145856

Patch Set 1 : #

Total comments: 12

Patch Set 2 : Added renderer-close check. #

Total comments: 8

Patch Set 3 : Added DLOG, DCHECK. #

Total comments: 15

Patch Set 4 : Reflect review comments. #

Total comments: 4

Patch Set 5 : Rebase. #

Patch Set 6 : Rebase (take 2). #

Total comments: 2

Patch Set 7 : Redesign by yzshen's comment. #

Patch Set 8 : Rebase. #

Total comments: 12

Patch Set 9 : Just rebasing #

Patch Set 10 : Reflect review comments. #

Total comments: 4

Patch Set 11 : Fix & Rebase. #

Patch Set 12 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -66 lines) Patch
M chrome/browser/chromeos/gdata/gdata_file_system_proxy.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/fileapi/fileapi_message_filter.h View 1 2 3 4 4 chunks +7 lines, -0 lines 0 comments Download
M content/browser/fileapi/fileapi_message_filter.cc View 1 2 3 4 5 5 chunks +38 lines, -1 line 0 comments Download
M content/common/fileapi/file_system_dispatcher.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/fileapi/file_system_dispatcher.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M content/common/fileapi/file_system_messages.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +70 lines, -54 lines 0 comments Download
M webkit/chromeos/fileapi/remote_file_system_operation.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M webkit/chromeos/fileapi/remote_file_system_operation.cc View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M webkit/chromeos/fileapi/remote_file_system_proxy.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_operation.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M webkit/fileapi/file_system_operation.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_operation_interface.h View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/plugin_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +15 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_io_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_io_impl.cc View 1 2 3 4 5 6 7 8 9 4 chunks +16 lines, -4 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
kinaba
8 years, 6 months ago (2012-06-13 05:10:22 UTC) #1
kinuko
http://codereview.chromium.org/10541113/diff/8001/content/browser/fileapi/fileapi_message_filter.cc File content/browser/fileapi/fileapi_message_filter.cc (right): http://codereview.chromium.org/10541113/diff/8001/content/browser/fileapi/fileapi_message_filter.cc#newcode402 content/browser/fileapi/fileapi_message_filter.cc:402: Send(new FileSystemMsg_DidFail(request_id, error)); What could happen if one opens ...
8 years, 6 months ago (2012-06-13 06:38:29 UTC) #2
kinaba
Reply for the most critical comment. On 2012/06/13 06:38:29, kinuko wrote: http://codereview.chromium.org/10541113/diff/8001/content/renderer/pepper/pepper_plugin_delegate_impl.cc#newcode924 > content/renderer/pepper/pepper_plugin_delegate_impl.cc:924: AsWeakPtr(), ...
8 years, 6 months ago (2012-06-13 07:15:30 UTC) #3
kinaba
Revised the patch. Kinuko, can you take a look once again? Main difference is the ...
8 years, 6 months ago (2012-06-25 11:14:02 UTC) #4
kinuko
Looking nicer now. Could we somehow test this code? http://codereview.chromium.org/10541113/diff/18002/content/browser/fileapi/fileapi_message_filter.cc File content/browser/fileapi/fileapi_message_filter.cc (right): http://codereview.chromium.org/10541113/diff/18002/content/browser/fileapi/fileapi_message_filter.cc#newcode413 content/browser/fileapi/fileapi_message_filter.cc:413: ...
8 years, 6 months ago (2012-06-25 11:46:54 UTC) #5
zel
crap, I started pretty much the same change as a part of wiring open file ...
8 years, 6 months ago (2012-06-25 16:23:03 UTC) #6
kinaba
On 2012/06/25 16:23:03, zel wrote: > crap, I started pretty much the same change as ...
8 years, 6 months ago (2012-06-25 23:11:14 UTC) #7
kinaba
Anyhow here's the update reflecting review comments from Kinuko. > Could we somehow test this ...
8 years, 6 months ago (2012-06-26 00:15:10 UTC) #8
zel
I had no good way to test truncate unless file close notification was implemented, that's ...
8 years, 6 months ago (2012-06-26 00:23:01 UTC) #9
zel
http://codereview.chromium.org/10541113/diff/25002/webkit/plugins/ppapi/ppb_file_io_impl.cc File webkit/plugins/ppapi/ppb_file_io_impl.cc (right): http://codereview.chromium.org/10541113/diff/25002/webkit/plugins/ppapi/ppb_file_io_impl.cc#newcode214 webkit/plugins/ppapi/ppb_file_io_impl.cc:214: if (!file_system_url_.is_empty()) { file_system_url_ is going to be set ...
8 years, 6 months ago (2012-06-26 01:42:18 UTC) #10
kinaba
http://codereview.chromium.org/10541113/diff/25002/webkit/plugins/ppapi/ppb_file_io_impl.cc File webkit/plugins/ppapi/ppb_file_io_impl.cc (right): http://codereview.chromium.org/10541113/diff/25002/webkit/plugins/ppapi/ppb_file_io_impl.cc#newcode214 webkit/plugins/ppapi/ppb_file_io_impl.cc:214: if (!file_system_url_.is_empty()) { On 2012/06/26 01:42:18, zel wrote: > ...
8 years, 6 months ago (2012-06-26 04:19:22 UTC) #11
kinuko
http://codereview.chromium.org/10541113/diff/25002/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc File chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc (right): http://codereview.chromium.org/10541113/diff/25002/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc#newcode397 chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc:397: nit: extra empty line http://codereview.chromium.org/10541113/diff/25002/content/browser/fileapi/fileapi_message_filter.cc File content/browser/fileapi/fileapi_message_filter.cc (right): http://codereview.chromium.org/10541113/diff/25002/content/browser/fileapi/fileapi_message_filter.cc#newcode421 ...
8 years, 6 months ago (2012-06-26 11:13:36 UTC) #12
zel
http://codereview.chromium.org/10541113/diff/25002/webkit/plugins/ppapi/ppb_file_io_impl.cc File webkit/plugins/ppapi/ppb_file_io_impl.cc (right): http://codereview.chromium.org/10541113/diff/25002/webkit/plugins/ppapi/ppb_file_io_impl.cc#newcode214 webkit/plugins/ppapi/ppb_file_io_impl.cc:214: if (!file_system_url_.is_empty()) { On 2012/06/26 11:13:36, kinuko wrote: > ...
8 years, 5 months ago (2012-06-26 23:51:57 UTC) #13
zel
I have merged and verified your changes with my CL (for file open+truncate) at https://chromiumcodereview.appspot.com/10600013. ...
8 years, 5 months ago (2012-06-27 00:04:08 UTC) #14
zel
http://codereview.chromium.org/10541113/diff/25002/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc File chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc (right): http://codereview.chromium.org/10541113/diff/25002/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc#newcode395 chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc:395: // corresponding NotifyCloseFile for committing dirty cache. please see ...
8 years, 5 months ago (2012-06-27 00:08:03 UTC) #15
kinaba
Updated. Who will be the good person to ask for Pepper-side review? http://codereview.chromium.org/10541113/diff/25002/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc File chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc ...
8 years, 5 months ago (2012-06-27 03:47:42 UTC) #16
kinuko
Can you rebase since I've just landed somewhat larger cleanup patch around FileAPIMessageFilter? http://codereview.chromium.org/10541113/diff/31003/content/browser/fileapi/fileapi_message_filter.cc File ...
8 years, 5 months ago (2012-06-27 04:02:58 UTC) #17
kinaba
Rebase & fix. http://codereview.chromium.org/10541113/diff/31003/content/browser/fileapi/fileapi_message_filter.cc File content/browser/fileapi/fileapi_message_filter.cc (right): http://codereview.chromium.org/10541113/diff/31003/content/browser/fileapi/fileapi_message_filter.cc#newcode134 content/browser/fileapi/fileapi_message_filter.cc:134: if (operation) On 2012/06/27 04:02:58, kinuko ...
8 years, 5 months ago (2012-06-27 04:26:06 UTC) #18
kinuko
yzshen@ or dmichael@ could you take a look at the pepper-side change?
8 years, 5 months ago (2012-06-27 04:29:08 UTC) #19
kinuko
lgtm for fileapi changes
8 years, 5 months ago (2012-06-27 04:29:30 UTC) #20
kinaba
Fixing build failures caused by my blind rebasing... > Can you rebase since I've just ...
8 years, 5 months ago (2012-06-27 04:55:48 UTC) #21
kinuko
On 2012/06/27 04:55:48, kinaba wrote: > Fixing build failures caused by my blind rebasing... > ...
8 years, 5 months ago (2012-06-27 05:44:33 UTC) #22
yzshen1
https://chromiumcodereview.appspot.com/10541113/diff/47003/webkit/plugins/ppapi/plugin_delegate.h File webkit/plugins/ppapi/plugin_delegate.h (right): https://chromiumcodereview.appspot.com/10541113/diff/47003/webkit/plugins/ppapi/plugin_delegate.h#newcode428 webkit/plugins/ppapi/plugin_delegate.h:428: virtual base::Callback<void (base::PlatformFileError)> It seems more intuitive to have ...
8 years, 5 months ago (2012-06-28 20:14:17 UTC) #23
kinaba
Thanks for the comment! http://codereview.chromium.org/10541113/diff/47003/webkit/plugins/ppapi/plugin_delegate.h File webkit/plugins/ppapi/plugin_delegate.h (right): http://codereview.chromium.org/10541113/diff/47003/webkit/plugins/ppapi/plugin_delegate.h#newcode428 webkit/plugins/ppapi/plugin_delegate.h:428: virtual base::Callback<void (base::PlatformFileError)> On 2012/06/28 ...
8 years, 5 months ago (2012-06-29 09:28:33 UTC) #24
dmichael (off chromium)
a couple of nits. O/w, webkit/plugins/ppapi lgtm http://codereview.chromium.org/10541113/diff/51024/content/renderer/pepper/pepper_plugin_delegate_impl.cc File content/renderer/pepper/pepper_plugin_delegate_impl.cc (right): http://codereview.chromium.org/10541113/diff/51024/content/renderer/pepper/pepper_plugin_delegate_impl.cc#newcode927 content/renderer/pepper/pepper_plugin_delegate_impl.cc:927: path))); nit: ...
8 years, 5 months ago (2012-06-29 16:06:40 UTC) #25
yzshen1
http://codereview.chromium.org/10541113/diff/51024/content/renderer/pepper/pepper_plugin_delegate_impl.cc File content/renderer/pepper/pepper_plugin_delegate_impl.cc (right): http://codereview.chromium.org/10541113/diff/51024/content/renderer/pepper/pepper_plugin_delegate_impl.cc#newcode890 content/renderer/pepper/pepper_plugin_delegate_impl.cc:890: close_file_callback_); [optional] Is it better to pass a no-op ...
8 years, 5 months ago (2012-06-29 17:15:52 UTC) #26
kinaba
Done. http://codereview.chromium.org/10541113/diff/51024/content/renderer/pepper/pepper_plugin_delegate_impl.cc File content/renderer/pepper/pepper_plugin_delegate_impl.cc (right): http://codereview.chromium.org/10541113/diff/51024/content/renderer/pepper/pepper_plugin_delegate_impl.cc#newcode890 content/renderer/pepper/pepper_plugin_delegate_impl.cc:890: close_file_callback_); On 2012/06/29 17:15:52, yzshen1 wrote: > [optional] ...
8 years, 5 months ago (2012-07-03 06:46:34 UTC) #27
yzshen1
ppapi part LGTM (with 2 nits) Thanks! http://codereview.chromium.org/10541113/diff/50007/content/renderer/pepper/pepper_plugin_delegate_impl.cc File content/renderer/pepper/pepper_plugin_delegate_impl.cc (right): http://codereview.chromium.org/10541113/diff/50007/content/renderer/pepper/pepper_plugin_delegate_impl.cc#newcode240 content/renderer/pepper/pepper_plugin_delegate_impl.cc:240: base::PlatformFile file) ...
8 years, 5 months ago (2012-07-03 17:26:31 UTC) #28
kinaba
Done. http://codereview.chromium.org/10541113/diff/50007/content/renderer/pepper/pepper_plugin_delegate_impl.cc File content/renderer/pepper/pepper_plugin_delegate_impl.cc (right): http://codereview.chromium.org/10541113/diff/50007/content/renderer/pepper/pepper_plugin_delegate_impl.cc#newcode240 content/renderer/pepper/pepper_plugin_delegate_impl.cc:240: base::PlatformFile file) { On 2012/07/03 17:26:31, yzshen1 wrote: ...
8 years, 5 months ago (2012-07-04 04:26:22 UTC) #29
kinaba
+brettw Brett, may I beg you an OWNER lgtm for content/ ?
8 years, 5 months ago (2012-07-04 04:54:27 UTC) #30
brettw
content lgtm rubberstamp
8 years, 5 months ago (2012-07-10 04:56:47 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinaba@chromium.org/10541113/49014
8 years, 5 months ago (2012-07-10 08:02:24 UTC) #32
commit-bot: I haz the power
8 years, 5 months ago (2012-07-10 09:03:41 UTC) #33
Change committed as 145856

Powered by Google App Engine
This is Rietveld 408576698