Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Issue 13726024: Refactor FileSystem (Closed)

Created:
7 years, 8 months ago by victorhsieh
Modified:
7 years, 8 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, teravest, kinuko, Matt Giuca
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Refactor FileSystem. Add global FileSystem registry for new FileSystem Support later. New file system will need to implement PepperFileSystemRegistry::FileSystemPeeker for FileRef to access. Due to the fact that 1) FileSystem and FileRef are tightly couple, 2) we wants to move both of them to browser together, there are two temporary changes in this CL. 1. webkit/plugins/ppapi/ppb_file_ref_impl.cc needs some delegation to access content::PepperFileSystemHost. The delegation code should be removed after FileRef is moved to content. 2. PepperFileSystemHost stays in renderer for now, and will be moved to browser together in the FileRef refactoring. Also, NullFileSystemCallbackDispatcher is added with default NOTREACHED callbacks. TEST=browser_tests --gtest_filter='*PPAPI*.*File*' BUG=227033 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193995

Patch Set 1 : #

Total comments: 51

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Patch Set 4 : #

Total comments: 9

Patch Set 5 : #

Total comments: 3

Patch Set 6 : #

Total comments: 2

Patch Set 7 : rebase #

Patch Set 8 : NON_EXPORTED_BASE #

Unified diffs Side-by-side diffs Delta from patch set Stats (+727 lines, -628 lines) Patch
M content/content_renderer.gypi View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/pepper/content_renderer_pepper_host_factory.cc View 1 2 chunks +21 lines, -7 lines 0 comments Download
A content/renderer/pepper/null_file_system_callback_dispatcher.h View 1 2 3 4 5 6 1 chunk +54 lines, -0 lines 0 comments Download
A content/renderer/pepper/null_file_system_callback_dispatcher.cc View 1 2 3 4 5 6 1 chunk +58 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_directory_reader_host.cc View 1 2 3 4 5 6 5 chunks +8 lines, -37 lines 0 comments Download
M content/renderer/pepper/pepper_file_io_host.h View 1 2 3 4 5 6 1 chunk +0 lines, -3 lines 0 comments Download
M content/renderer/pepper/pepper_file_io_host.cc View 1 2 3 4 5 6 6 chunks +6 lines, -46 lines 0 comments Download
A content/renderer/pepper/pepper_file_system_host.h View 1 1 chunk +61 lines, -0 lines 0 comments Download
A content/renderer/pepper/pepper_file_system_host.cc View 1 2 3 4 1 chunk +132 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_in_process_resource_creation.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_in_process_resource_creation.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.h View 1 2 3 4 5 3 chunks +10 lines, -5 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.cc View 1 2 3 4 5 6 4 chunks +36 lines, -9 lines 0 comments Download
M ppapi/ppapi_proxy.gypi View 2 chunks +2 lines, -2 lines 0 comments Download
A ppapi/proxy/file_system_resource.h View 1 2 3 4 5 6 7 1 chunk +55 lines, -0 lines 0 comments Download
A ppapi/proxy/file_system_resource.cc View 1 2 3 4 1 chunk +60 lines, -0 lines 0 comments Download
M ppapi/proxy/interface_list.cc View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 6 4 chunks +11 lines, -11 lines 0 comments Download
M ppapi/proxy/ppb_file_ref_proxy.h View 2 chunks +4 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_file_ref_proxy.cc View 1 2 3 4 chunks +18 lines, -13 lines 0 comments Download
D ppapi/proxy/ppb_file_system_proxy.h View 1 chunk +0 lines, -62 lines 0 comments Download
D ppapi/proxy/ppb_file_system_proxy.cc View 1 chunk +0 lines, -190 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.h View 1 chunk +2 lines, -1 line 0 comments Download
M ppapi/proxy/resource_creation_proxy.cc View 3 chunks +6 lines, -4 lines 0 comments Download
M ppapi/shared_impl/ppb_file_ref_shared.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M ppapi/thunk/interfaces_ppb_public_stable.h View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M ppapi/thunk/ppb_file_ref_thunk.cc View 1 2 chunks +6 lines, -5 lines 0 comments Download
M ppapi/thunk/resource_creation_api.h View 1 chunk +2 lines, -1 line 0 comments Download
M webkit/glue/webkit_glue.gypi View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/file_callbacks.h View 3 chunks +7 lines, -5 lines 0 comments Download
M webkit/plugins/ppapi/file_callbacks.cc View 4 chunks +13 lines, -13 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.h View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.cc View 1 2 3 4 5 2 chunks +22 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/plugin_delegate.h View 1 2 3 4 5 6 4 chunks +15 lines, -5 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_ref_impl.h View 1 2 3 4 chunks +28 lines, -8 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_ref_impl.cc View 1 2 3 4 5 13 chunks +54 lines, -30 lines 0 comments Download
D webkit/plugins/ppapi/ppb_file_system_impl.h View 1 chunk +0 lines, -55 lines 0 comments Download
D webkit/plugins/ppapi/ppb_file_system_impl.cc View 1 chunk +0 lines, -95 lines 0 comments Download
M webkit/plugins/ppapi/resource_creation_impl.h View 1 chunk +2 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/resource_creation_impl.cc View 4 5 2 chunks +6 lines, -10 lines 0 comments Download
M webkit/plugins/ppapi/url_request_info_util.cc View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
victorhsieh
7 years, 8 months ago (2013-04-06 00:11:40 UTC) #1
victorhsieh
FYI, I add a PepperFileSystemRegistry for supporting adding new file systems. New file system will ...
7 years, 8 months ago (2013-04-08 19:25:09 UTC) #2
yzshen1
On 2013/04/08 19:25:09, Victor Hsieh wrote: > FYI, I add a PepperFileSystemRegistry for supporting adding ...
7 years, 8 months ago (2013-04-08 19:34:57 UTC) #3
victorhsieh
On 2013/04/08 19:34:57, yzshen1 wrote: > On 2013/04/08 19:25:09, Victor Hsieh wrote: > > FYI, ...
7 years, 8 months ago (2013-04-08 20:42:01 UTC) #4
yzshen1
https://codereview.chromium.org/13726024/diff/5001/content/renderer/pepper/content_renderer_pepper_host_factory.cc File content/renderer/pepper/content_renderer_pepper_host_factory.cc (right): https://codereview.chromium.org/13726024/diff/5001/content/renderer/pepper/content_renderer_pepper_host_factory.cc#newcode54 content/renderer/pepper/content_renderer_pepper_host_factory.cc:54: if (!PpapiHostMsg_FileSystem_Create::Read(&message, &msg_params)) { Please use UnpackMessage() defined in ...
7 years, 8 months ago (2013-04-08 21:05:15 UTC) #5
yzshen1
Thanks! Also +CC Raymes who is interested in this patch. On Mon, Apr 8, 2013 ...
7 years, 8 months ago (2013-04-08 21:06:21 UTC) #6
victorhsieh
PTAL https://codereview.chromium.org/13726024/diff/5001/content/renderer/pepper/content_renderer_pepper_host_factory.cc File content/renderer/pepper/content_renderer_pepper_host_factory.cc (right): https://codereview.chromium.org/13726024/diff/5001/content/renderer/pepper/content_renderer_pepper_host_factory.cc#newcode54 content/renderer/pepper/content_renderer_pepper_host_factory.cc:54: if (!PpapiHostMsg_FileSystem_Create::Read(&message, &msg_params)) { On 2013/04/08 21:05:16, yzshen1 ...
7 years, 8 months ago (2013-04-08 23:44:37 UTC) #7
yzshen1
https://codereview.chromium.org/13726024/diff/5001/content/renderer/pepper/pepper_file_system_host.h File content/renderer/pepper/pepper_file_system_host.h (right): https://codereview.chromium.org/13726024/diff/5001/content/renderer/pepper/pepper_file_system_host.h#newcode45 content/renderer/pepper/pepper_file_system_host.h:45: void OpenFileSystemReply(int pp_error, It is fine to leave it ...
7 years, 8 months ago (2013-04-09 17:25:42 UTC) #8
victorhsieh
Also, NullFileSystemCallbackDispatcher inline implementation is now split to .cc as we don't inline virtual. https://codereview.chromium.org/13726024/diff/5001/content/renderer/pepper/null_file_system_callback_dispatcher.h ...
7 years, 8 months ago (2013-04-09 18:02:45 UTC) #9
victorhsieh
Brett, could you please review following files for owner approval? content/content_renderer.gypi webkit/glue/webkit_glue.gypi Julian, could you ...
7 years, 8 months ago (2013-04-09 19:41:46 UTC) #10
brettw
gypi lgtm
7 years, 8 months ago (2013-04-09 19:55:15 UTC) #11
victorhsieh
PTAL https://codereview.chromium.org/13726024/diff/5001/webkit/plugins/ppapi/ppb_file_ref_impl.h File webkit/plugins/ppapi/ppb_file_ref_impl.h (right): https://codereview.chromium.org/13726024/diff/5001/webkit/plugins/ppapi/ppb_file_ref_impl.h#newcode83 webkit/plugins/ppapi/ppb_file_ref_impl.h:83: PP_Resource file_system_; On 2013/04/09 17:25:42, yzshen1 wrote: > ...
7 years, 8 months ago (2013-04-10 19:07:10 UTC) #12
yzshen1
https://codereview.chromium.org/13726024/diff/40001/content/renderer/pepper/null_file_system_callback_dispatcher.cc File content/renderer/pepper/null_file_system_callback_dispatcher.cc (right): https://codereview.chromium.org/13726024/diff/40001/content/renderer/pepper/null_file_system_callback_dispatcher.cc#newcode19 content/renderer/pepper/null_file_system_callback_dispatcher.cc:19: const base::PlatformFileInfo& file_info, You probably should put /**/ around ...
7 years, 8 months ago (2013-04-11 17:04:57 UTC) #13
victorhsieh
PTAL https://codereview.chromium.org/13726024/diff/40001/content/renderer/pepper/null_file_system_callback_dispatcher.cc File content/renderer/pepper/null_file_system_callback_dispatcher.cc (right): https://codereview.chromium.org/13726024/diff/40001/content/renderer/pepper/null_file_system_callback_dispatcher.cc#newcode19 content/renderer/pepper/null_file_system_callback_dispatcher.cc:19: const base::PlatformFileInfo& file_info, On 2013/04/11 17:04:57, yzshen1 wrote: ...
7 years, 8 months ago (2013-04-11 18:24:38 UTC) #14
victorhsieh
Julian, I think this refactoring doesn't change the attach surface much. I put some review ...
7 years, 8 months ago (2013-04-11 18:39:20 UTC) #15
victorhsieh
Yuzhu, please see if this is correct as we discussed offline. I moved the add-ref ...
7 years, 8 months ago (2013-04-11 19:29:56 UTC) #16
jln (very slow on Chromium)
I had a cursory look, following the trail from ppapi_messages.h. As always with PPAPI, the ...
7 years, 8 months ago (2013-04-11 20:32:50 UTC) #17
victorhsieh
Thanks. https://codereview.chromium.org/13726024/diff/63001/ppapi/proxy/ppapi_messages.h File ppapi/proxy/ppapi_messages.h (right): https://codereview.chromium.org/13726024/diff/63001/ppapi/proxy/ppapi_messages.h#newcode1408 ppapi/proxy/ppapi_messages.h:1408: IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileSystem_OpenReply) On 2013/04/11 20:32:51, Julien Tinnes wrote: > ...
7 years, 8 months ago (2013-04-11 20:49:04 UTC) #18
jln (very slow on Chromium)
ppapi/proxy/ppapi_messages.h lgtm
7 years, 8 months ago (2013-04-11 20:52:59 UTC) #19
yzshen1
Thanks for the nice work. LGTM
7 years, 8 months ago (2013-04-11 23:38:41 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/13726024/83001
7 years, 8 months ago (2013-04-12 16:42:17 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/13726024/93004
7 years, 8 months ago (2013-04-12 17:42:39 UTC) #22
commit-bot: I haz the power
7 years, 8 months ago (2013-04-12 20:28:16 UTC) #23
Message was sent while issue was closed.
Change committed as 193995

Powered by Google App Engine
This is Rietveld 408576698