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

Issue 14784002: Move DirectoryReader::ReadEntries to FileRef::ReadDirectoryEntries (Closed)

Created:
7 years, 7 months ago by hamaji
Modified:
7 years, 7 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, jam, yzshen+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, raymes+watch_chromium.org, piman+watch_chromium.org, ihf+watch_chromium.org, nhiroki
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Move DirectoryReader::ReadEntries to FileRef::ReadDirectoryEntries This also means this API becomes a stable API. While DirectoryReader was using the new pepper proxy API, FileRef is using the old one. As updating FileRef would take some time, the implementation of ReadEntries is converted from the new design to the old one for now. BUG=234513 TEST=browser_tests R=avi@chromium.org, binji@chromium.org, dmichael@chromium.org, palmer@chromium.org, raymes@chromium.org, teravest@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=198204

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix naclsdk #

Total comments: 38

Patch Set 3 : address teravests's comments #

Total comments: 1

Patch Set 4 : address dmichael's comments #

Total comments: 44

Patch Set 5 : address comments by dmichael and raymes #

Total comments: 4

Patch Set 6 : address dmichael's comment #

Patch Set 7 : address palmer's comments #

Patch Set 8 : sstream instead of snprintf #

Total comments: 5

Patch Set 9 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+824 lines, -1322 lines) Patch
M chrome/test/ppapi/ppapi_browsertest.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M content/renderer/pepper/content_renderer_pepper_host_factory.cc View 2 chunks +0 lines, -4 lines 0 comments Download
D content/renderer/pepper/pepper_directory_reader_host.h View 1 chunk +0 lines, -72 lines 0 comments Download
D content/renderer/pepper/pepper_directory_reader_host.cc View 1 chunk +0 lines, -189 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/mount_node_html5fs.cc View 1 2 3 4 3 chunks +6 lines, -21 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/pepper/all_interfaces.h View 1 2 3 4 2 chunks +2 lines, -7 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/pepper_interface.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M native_client_sdk/src/libraries/nacl_io_test/mount_html5fs_test.cc View 1 2 3 4 5 chunks +9 lines, -14 lines 0 comments Download
D ppapi/api/dev/ppb_directory_reader_dev.idl View 1 chunk +0 lines, -46 lines 0 comments Download
A + ppapi/api/pp_directory_entry.idl View 1 2 3 1 chunk +8 lines, -7 lines 0 comments Download
M ppapi/api/ppb_file_ref.idl View 1 2 3 4 5 2 chunks +18 lines, -1 line 0 comments Download
D ppapi/c/dev/ppb_directory_reader_dev.h View 1 chunk +0 lines, -78 lines 0 comments Download
A ppapi/c/pp_directory_entry.h View 1 chunk +37 lines, -0 lines 0 comments Download
M ppapi/c/ppb_file_ref.h View 1 2 3 4 5 3 chunks +18 lines, -2 lines 0 comments Download
D ppapi/cpp/dev/directory_entry_dev.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -89 lines 0 comments Download
D ppapi/cpp/dev/directory_entry_dev.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -76 lines 0 comments Download
D ppapi/cpp/dev/directory_reader_dev.h View 1 chunk +0 lines, -56 lines 0 comments Download
D ppapi/cpp/dev/directory_reader_dev.cc View 1 chunk +0 lines, -44 lines 0 comments Download
M ppapi/cpp/dev/file_chooser_dev.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A ppapi/cpp/directory_entry.h View 1 2 3 4 5 6 7 8 1 chunk +127 lines, -0 lines 0 comments Download
A + ppapi/cpp/directory_entry.cc View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -12 lines 0 comments Download
M ppapi/cpp/file_ref.h View 1 2 3 4 3 chunks +25 lines, -1 line 0 comments Download
M ppapi/cpp/file_ref.cc View 1 2 3 4 5 6 2 chunks +9 lines, -1 line 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 3 4 8 chunks +7 lines, -35 lines 0 comments Download
M ppapi/ppapi_proxy.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M ppapi/ppapi_shared.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M ppapi/ppapi_sources.gypi View 4 chunks +2 lines, -7 lines 0 comments Download
D ppapi/proxy/directory_reader_resource.h View 1 chunk +0 lines, -58 lines 0 comments Download
D ppapi/proxy/directory_reader_resource.cc View 1 chunk +0 lines, -108 lines 0 comments Download
M ppapi/proxy/interface_list.cc View 1 chunk +0 lines, -1 line 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 4 chunks +11 lines, -9 lines 0 comments Download
M ppapi/proxy/ppb_file_ref_proxy.h View 1 2 3 4 5 chunks +24 lines, -3 lines 0 comments Download
M ppapi/proxy/ppb_file_ref_proxy.cc View 1 2 3 4 5 6 7 8 14 chunks +164 lines, -13 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.h View 1 chunk +0 lines, -2 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.cc View 2 chunks +0 lines, -8 lines 0 comments Download
M ppapi/shared_impl/resource.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M ppapi/tests/all_c_includes.h View 1 chunk +0 lines, -1 line 0 comments Download
M ppapi/tests/all_cpp_includes.h View 2 chunks +1 line, -2 lines 0 comments Download
D ppapi/tests/test_directory_reader.h View 1 chunk +0 lines, -31 lines 0 comments Download
D ppapi/tests/test_directory_reader.cc View 1 chunk +0 lines, -182 lines 0 comments Download
M ppapi/tests/test_file_ref.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M ppapi/tests/test_file_ref.cc View 1 2 3 4 5 6 7 5 chunks +152 lines, -8 lines 0 comments Download
M ppapi/tests/test_file_system.cc View 1 chunk +1 line, -1 line 0 comments Download
M ppapi/thunk/interfaces_ppb_public_dev.h View 1 chunk +0 lines, -2 lines 0 comments Download
D ppapi/thunk/ppb_directory_reader_api.h View 1 chunk +0 lines, -28 lines 0 comments Download
D ppapi/thunk/ppb_directory_reader_thunk.cc View 1 chunk +0 lines, -61 lines 0 comments Download
M ppapi/thunk/ppb_file_ref_api.h View 1 2 3 4 5 2 chunks +21 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_file_ref_thunk.cc View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -1 line 0 comments Download
M ppapi/thunk/resource_creation_api.h View 1 chunk +0 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/file_callbacks.h View 1 2 3 4 5 3 chunks +24 lines, -4 lines 0 comments Download
M webkit/plugins/ppapi/file_callbacks.cc View 1 2 3 4 5 6 4 chunks +51 lines, -8 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/plugin_delegate.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/plugin_module.cc View 1 chunk +0 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/ppb_file_ref_impl.h View 1 2 3 4 5 3 chunks +13 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_ref_impl.cc View 1 2 3 4 5 8 chunks +43 lines, -6 lines 0 comments Download
M webkit/plugins/ppapi/resource_creation_impl.h View 1 chunk +0 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/resource_creation_impl.cc View 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
hamaji
7 years, 7 months ago (2013-05-01 17:58:56 UTC) #1
jam
redirecting to avi
7 years, 7 months ago (2013-05-01 19:34:40 UTC) #2
Avi (use Gerrit)
Please specify who should be reviewing what. content/ code lgtm.
7 years, 7 months ago (2013-05-01 19:40:34 UTC) #3
hamaji
Sorry, avi (OWNERS): content/content_renderer.gypi palmer (OWNERS) and aedla: ppapi/proxy/ppapi_messsages.h dmichael, yzshen1: everything else
7 years, 7 months ago (2013-05-01 19:50:13 UTC) #4
palmer
I don't understand the security implications of this large change, and the bug doesn't have ...
7 years, 7 months ago (2013-05-01 19:57:40 UTC) #5
hamaji
This change just moves an existing PPAPI which returns the list of filenames in an ...
7 years, 7 months ago (2013-05-01 20:31:39 UTC) #6
hamaji
+binji Hi Ben, could you review the changes for native_client_sdk/*? I took over this work ...
7 years, 7 months ago (2013-05-02 03:41:35 UTC) #7
binji
native_client_sdk lgtm, thanks!
7 years, 7 months ago (2013-05-02 05:18:27 UTC) #8
teravest
It's weird to see so much use of OwnedWrapper in this patch; it's not used ...
7 years, 7 months ago (2013-05-02 17:32:09 UTC) #9
yzshen1
On 2013/05/02 05:18:27, binji wrote: > native_client_sdk lgtm, thanks! Redirecting to Raymes. (Thanks a lot, ...
7 years, 7 months ago (2013-05-02 17:39:14 UTC) #10
hamaji
As for Owned, I didn't no this isn't so popular. I just followed the way ...
7 years, 7 months ago (2013-05-02 18:49:39 UTC) #11
teravest
On Thu, May 2, 2013 at 12:49 PM, <hamaji@chromium.org> wrote: > As for Owned, I ...
7 years, 7 months ago (2013-05-02 19:30:46 UTC) #12
dmichael (off chromium)
Thanks for doing this!! https://codereview.chromium.org/14784002/diff/1/ppapi/api/pp_directory_entry.idl File ppapi/api/pp_directory_entry.idl (right): https://codereview.chromium.org/14784002/diff/1/ppapi/api/pp_directory_entry.idl#newcode12 ppapi/api/pp_directory_entry.idl:12: }; ^^ Not sure if ...
7 years, 7 months ago (2013-05-02 19:43:53 UTC) #13
teravest
lgtm
7 years, 7 months ago (2013-05-02 20:08:24 UTC) #14
hamaji
Thanks guys for your comments! https://codereview.chromium.org/14784002/diff/1/ppapi/api/pp_directory_entry.idl File ppapi/api/pp_directory_entry.idl (right): https://codereview.chromium.org/14784002/diff/1/ppapi/api/pp_directory_entry.idl#newcode12 ppapi/api/pp_directory_entry.idl:12: }; Ah, removed. https://codereview.chromium.org/14784002/diff/8001/ppapi/api/ppb_file_ref.idl ...
7 years, 7 months ago (2013-05-02 20:14:48 UTC) #15
dmichael (off chromium)
Looking pretty good, just a couple of things I noticed... https://codereview.chromium.org/14784002/diff/33003/ppapi/cpp/directory_entry.h File ppapi/cpp/directory_entry.h (right): https://codereview.chromium.org/14784002/diff/33003/ppapi/cpp/directory_entry.h#newcode13 ...
7 years, 7 months ago (2013-05-02 20:39:12 UTC) #16
raymes
https://codereview.chromium.org/14784002/diff/26001/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): https://codereview.chromium.org/14784002/diff/26001/ppapi/api/ppb_file_ref.idl#newcode201 ppapi/api/ppb_file_ref.idl:201: int32_t ReadEntries([in] PP_Resource file_ref, Now that this has moved ...
7 years, 7 months ago (2013-05-02 20:44:14 UTC) #17
raymes
https://codereview.chromium.org/14784002/diff/33003/ppapi/proxy/ppb_file_ref_proxy.cc File ppapi/proxy/ppb_file_ref_proxy.cc (right): https://codereview.chromium.org/14784002/diff/33003/ppapi/proxy/ppb_file_ref_proxy.cc#newcode252 ppapi/proxy/ppb_file_ref_proxy.cc:252: return PP_OK; should this return PP_OK or a failure ...
7 years, 7 months ago (2013-05-02 21:45:20 UTC) #18
hamaji
Renamed ReadEntries to ReadDirectoryEntries. Confirmed browser_tests passes for FileRef and git grep ReadEntries returns empty. ...
7 years, 7 months ago (2013-05-02 22:45:14 UTC) #19
dmichael (off chromium)
https://codereview.chromium.org/14784002/diff/33003/ppapi/cpp/directory_entry.h File ppapi/cpp/directory_entry.h (right): https://codereview.chromium.org/14784002/diff/33003/ppapi/cpp/directory_entry.h#newcode13 ppapi/cpp/directory_entry.h:13: class DirectoryEntry { On 2013/05/02 22:45:14, hamaji wrote: > ...
7 years, 7 months ago (2013-05-02 23:20:43 UTC) #20
hamaji
https://codereview.chromium.org/14784002/diff/33003/ppapi/cpp/directory_entry.h File ppapi/cpp/directory_entry.h (right): https://codereview.chromium.org/14784002/diff/33003/ppapi/cpp/directory_entry.h#newcode13 ppapi/cpp/directory_entry.h:13: class DirectoryEntry { Oops, sorry :( https://codereview.chromium.org/14784002/diff/33003/webkit/plugins/ppapi/file_callbacks.h File webkit/plugins/ppapi/file_callbacks.h ...
7 years, 7 months ago (2013-05-02 23:36:33 UTC) #21
palmer
https://codereview.chromium.org/14784002/diff/33003/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): https://codereview.chromium.org/14784002/diff/33003/ppapi/api/ppb_file_ref.idl#newcode194 ppapi/api/ppb_file_ref.idl:194: * @param[in] output An output array which will receive ...
7 years, 7 months ago (2013-05-03 00:07:24 UTC) #22
palmer
Also, best practice is to either check the return value of snprintf to make sure ...
7 years, 7 months ago (2013-05-03 00:09:08 UTC) #23
hamaji
Thanks palmer for your review! As for StringPrintf, I think we cannot use it from ...
7 years, 7 months ago (2013-05-03 01:10:34 UTC) #24
hamaji
I've just remembered windows doesn't have snprintf. I think sstream would be a cleaner solution ...
7 years, 7 months ago (2013-05-03 01:18:48 UTC) #25
dmichael (off chromium)
lgtm https://codereview.chromium.org/14784002/diff/33003/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): https://codereview.chromium.org/14784002/diff/33003/ppapi/api/ppb_file_ref.idl#newcode194 ppapi/api/ppb_file_ref.idl:194: * @param[in] output An output array which will ...
7 years, 7 months ago (2013-05-03 02:54:57 UTC) #26
raymes
lgtm On Thu, May 2, 2013 at 7:54 PM, <dmichael@chromium.org> wrote: > lgtm > > ...
7 years, 7 months ago (2013-05-03 03:06:48 UTC) #27
hamaji
Thanks comments especially for [in] or [out]! I wasn't sure which is the better. https://codereview.chromium.org/14784002/diff/64069/webkit/plugins/ppapi/file_callbacks.cc ...
7 years, 7 months ago (2013-05-03 03:40:49 UTC) #28
palmer
lgtm
7 years, 7 months ago (2013-05-03 17:34:02 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hamaji@chromium.org/14784002/64069
7 years, 7 months ago (2013-05-03 17:35:28 UTC) #30
commit-bot: I haz the power
Failed to apply patch for ppapi/cpp/array_output.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 7 months ago (2013-05-03 17:35:45 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hamaji@chromium.org/14784002/14002
7 years, 7 months ago (2013-05-03 18:01:29 UTC) #32
palmer
https://codereview.chromium.org/14784002/diff/64069/webkit/plugins/ppapi/file_callbacks.cc File webkit/plugins/ppapi/file_callbacks.cc (right): https://codereview.chromium.org/14784002/diff/64069/webkit/plugins/ppapi/file_callbacks.cc#newcode106 webkit/plugins/ppapi/file_callbacks.cc:106: if (dir_path.empty() || dir_path[dir_path.size() - 1] != '/') http://www.cplusplus.com/reference/string/string/back/ ...
7 years, 7 months ago (2013-05-03 18:02:32 UTC) #33
hamaji
Thanks again for reviewers! https://codereview.chromium.org/14784002/diff/64069/webkit/plugins/ppapi/file_callbacks.cc File webkit/plugins/ppapi/file_callbacks.cc (right): https://codereview.chromium.org/14784002/diff/64069/webkit/plugins/ppapi/file_callbacks.cc#newcode106 webkit/plugins/ppapi/file_callbacks.cc:106: if (dir_path.empty() || dir_path[dir_path.size() - ...
7 years, 7 months ago (2013-05-03 18:11:18 UTC) #34
dmichael (off chromium)
https://codereview.chromium.org/14784002/diff/64069/webkit/plugins/ppapi/file_callbacks.cc File webkit/plugins/ppapi/file_callbacks.cc (right): https://codereview.chromium.org/14784002/diff/64069/webkit/plugins/ppapi/file_callbacks.cc#newcode106 webkit/plugins/ppapi/file_callbacks.cc:106: if (dir_path.empty() || dir_path[dir_path.size() - 1] != '/') On ...
7 years, 7 months ago (2013-05-03 18:28:16 UTC) #35
hamaji
7 years, 7 months ago (2013-05-03 21:52:01 UTC) #36
Message was sent while issue was closed.
Committed patchset #9 manually as r198204 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698