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

Issue 12817009: Add Query() support to FileRef (Closed)

Created:
7 years, 9 months ago by teravest
Modified:
7 years, 8 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, tzik+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, kinuko+watch, ihf+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add Query() support to FileRef. This change brings Query() support back to FileRef for in-process and out-of-process plugins. I've added testing for a file that exists and one that doesn't. BUG=170721 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=191805

Patch Set 1 #

Patch Set 2 : #

Total comments: 13

Patch Set 3 : #

Total comments: 18

Patch Set 4 : Fix yuzhu's concerns, fix tests #

Total comments: 2

Patch Set 5 : Fix memory leak #

Total comments: 2

Patch Set 6 : Fix method signature for Owned() #

Patch Set 7 : callback type, PP_FileInfo initialization #

Total comments: 1

Patch Set 8 : Support Query() for external filesystems. #

Patch Set 9 : Use the newest interface for every cpp FileRef call. #

Total comments: 11

Patch Set 10 : Don't leak file handles, fix nits #

Total comments: 12

Patch Set 11 : nits, blocking completion callback test broken. #

Patch Set 12 : Fix test for blocking callbacks #

Patch Set 13 : Take ref on PPB_FileRef_Impl instead of PluginInstance. #

Total comments: 6

Patch Set 14 : nits, more callback ref shuffling. #

Total comments: 2

Patch Set 15 : Changed MessageLoopProxy to TaskRunner. #

Patch Set 16 : Rebased onto origin/master #

Patch Set 17 : Fix for test_file_io #

Patch Set 18 : Merged onto origin/master yet again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+631 lines, -102 lines) Patch
M ppapi/api/ppb_file_ref.idl View 1 2 3 4 5 6 7 8 9 10 2 chunks +20 lines, -1 line 0 comments Download
M ppapi/c/ppb_file_ref.h View 4 chunks +42 lines, -4 lines 0 comments Download
M ppapi/cpp/file_ref.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +13 lines, -1 line 0 comments Download
M ppapi/cpp/file_ref.cc View 1 2 3 4 5 6 7 8 9 3 chunks +105 lines, -43 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +92 lines, -0 lines 0 comments Download
M ppapi/proxy/enter_proxy.h View 1 chunk +17 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +15 lines, -5 lines 0 comments Download
M ppapi/proxy/ppb_file_ref_proxy.h View 1 2 3 4 5 6 2 chunks +19 lines, -6 lines 0 comments Download
M ppapi/proxy/ppb_file_ref_proxy.cc View 1 2 3 4 5 6 7 8 9 15 chunks +78 lines, -12 lines 0 comments Download
M ppapi/tests/test_file_ref.h View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -0 lines 0 comments Download
M ppapi/tests/test_file_ref.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +89 lines, -26 lines 0 comments Download
M ppapi/thunk/interfaces_ppb_public_stable.h View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/thunk/ppb_file_ref_api.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_file_ref_thunk.cc View 4 chunks +30 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_ref_impl.h View 1 2 3 8 9 13 2 chunks +4 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_ref_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +95 lines, -2 lines 0 comments Download

Messages

Total messages: 54 (0 generated)
teravest
7 years, 9 months ago (2013-03-18 20:27:23 UTC) #1
dmichael (off chromium)
https://codereview.chromium.org/12817009/diff/2001/ppapi/cpp/file_ref.h File ppapi/cpp/file_ref.h (right): https://codereview.chromium.org/12817009/diff/2001/ppapi/cpp/file_ref.h#newcode157 ppapi/cpp/file_ref.h:157: int32_t Query(PP_FileInfo* info, const CompletionCallback& callback); Please use "CompletionCallbackWithOutput<PP_FileInfo>" ...
7 years, 9 months ago (2013-03-18 23:16:16 UTC) #2
Yusuke Sato
Thanks for the work! drive-by non-codereview comment: I tested the new API with my PPAPI ...
7 years, 9 months ago (2013-03-19 00:01:12 UTC) #3
teravest1
On Mon, Mar 18, 2013 at 6:01 PM, <yusukes@chromium.org> wrote: > Thanks for the work! ...
7 years, 9 months ago (2013-03-19 14:42:19 UTC) #4
raymes1
> I'll take a look at sending the request directly to the browser. It > ...
7 years, 9 months ago (2013-03-19 16:30:32 UTC) #5
teravest1
On Tue, Mar 19, 2013 at 10:30 AM, Raymes Khoury <raymes@google.com> wrote: >> I'll take ...
7 years, 9 months ago (2013-03-19 16:35:18 UTC) #6
yzshen
Hi, Justin. I have a question: It looks like this change will directly go to ...
7 years, 9 months ago (2013-03-19 16:41:19 UTC) #7
dmichael (off chromium)
On Tue, Mar 19, 2013 at 10:41 AM, Yuzhu Shen <yzshen@google.com> wrote: > Hi, Justin. ...
7 years, 9 months ago (2013-03-19 16:51:53 UTC) #8
yzshen
On Tue, Mar 19, 2013 at 9:51 AM, David Michael <dmichael@chromium.org>wrote: > > > > ...
7 years, 9 months ago (2013-03-19 17:06:31 UTC) #9
Yusuke Sato
On 2013/03/19 16:35:18, teravest_google.com wrote: > On Tue, Mar 19, 2013 at 10:30 AM, Raymes ...
7 years, 9 months ago (2013-03-19 21:44:06 UTC) #10
teravest
Yusuke, Your plan sounds reasonable to me. I think the matter of using file desciptors ...
7 years, 9 months ago (2013-03-20 17:35:46 UTC) #11
Yusuke Sato
On 2013/03/20 17:35:46, teravest wrote: > Yusuke, > Your plan sounds reasonable to me. > ...
7 years, 9 months ago (2013-03-20 17:48:24 UTC) #12
teravest
https://codereview.chromium.org/12817009/diff/2001/ppapi/cpp/file_ref.h File ppapi/cpp/file_ref.h (right): https://codereview.chromium.org/12817009/diff/2001/ppapi/cpp/file_ref.h#newcode157 ppapi/cpp/file_ref.h:157: int32_t Query(PP_FileInfo* info, const CompletionCallback& callback); On 2013/03/18 23:16:16, ...
7 years, 9 months ago (2013-03-21 16:45:03 UTC) #13
yzshen1
https://codereview.chromium.org/12817009/diff/19001/ppapi/cpp/file_ref.h File ppapi/cpp/file_ref.h (right): https://codereview.chromium.org/12817009/diff/19001/ppapi/cpp/file_ref.h#newcode153 ppapi/cpp/file_ref.h:153: /// @param[out] info A pointer to a <code>PP_FileInfo</code> which ...
7 years, 9 months ago (2013-03-21 17:18:10 UTC) #14
teravest
https://codereview.chromium.org/12817009/diff/19001/ppapi/cpp/file_ref.h File ppapi/cpp/file_ref.h (right): https://codereview.chromium.org/12817009/diff/19001/ppapi/cpp/file_ref.h#newcode153 ppapi/cpp/file_ref.h:153: /// @param[out] info A pointer to a <code>PP_FileInfo</code> which ...
7 years, 9 months ago (2013-03-21 19:48:56 UTC) #15
yzshen1
https://codereview.chromium.org/12817009/diff/29001/ppapi/proxy/ppb_file_ref_proxy.cc File ppapi/proxy/ppb_file_ref_proxy.cc (right): https://codereview.chromium.org/12817009/diff/29001/ppapi/proxy/ppb_file_ref_proxy.cc#newcode332 ppapi/proxy/ppb_file_ref_proxy.cc:332: PP_FileInfo* info = new PP_FileInfo(); Unfortunately, this may be ...
7 years, 9 months ago (2013-03-21 21:06:31 UTC) #16
teravest
On Thu, Mar 21, 2013 at 3:06 PM, <yzshen@chromium.org> wrote: > > https://codereview.chromium.org/12817009/diff/29001/ppapi/proxy/ppb_file_ref_proxy.cc > File ...
7 years, 9 months ago (2013-03-21 21:23:16 UTC) #17
yzshen1
Thanks Justin! https://codereview.chromium.org/12817009/diff/43001/ppapi/proxy/ppb_file_ref_proxy.cc File ppapi/proxy/ppb_file_ref_proxy.cc (right): https://codereview.chromium.org/12817009/diff/43001/ppapi/proxy/ppb_file_ref_proxy.cc#newcode336 ppapi/proxy/ppb_file_ref_proxy.cc:336: base::Owned(info), callback_id); I thought you will need ...
7 years, 9 months ago (2013-03-21 22:02:04 UTC) #18
teravest
On Thu, Mar 21, 2013 at 4:02 PM, <yzshen@chromium.org> wrote: > Thanks Justin! > > ...
7 years, 9 months ago (2013-03-21 22:04:27 UTC) #19
dmichael (off chromium)
https://codereview.chromium.org/12817009/diff/2001/ppapi/proxy/ppb_file_ref_proxy.cc File ppapi/proxy/ppb_file_ref_proxy.cc (right): https://codereview.chromium.org/12817009/diff/2001/ppapi/proxy/ppb_file_ref_proxy.cc#newcode82 ppapi/proxy/ppb_file_ref_proxy.cc:82: typedef std::map<unsigned int, PP_FileInfo*> PendingFileInfoMap; On 2013/03/21 16:45:04, teravest ...
7 years, 9 months ago (2013-03-21 22:11:28 UTC) #20
teravest
On Thu, Mar 21, 2013 at 4:11 PM, <dmichael@chromium.org> wrote: > > https://codereview.chromium.org/12817009/diff/2001/ppapi/proxy/ppb_file_ref_proxy.cc > File ...
7 years, 9 months ago (2013-03-21 22:41:26 UTC) #21
yzshen
> I figure we can always relax this to work for external file systems later ...
7 years, 9 months ago (2013-03-21 23:33:58 UTC) #22
Yusuke Sato
https://codereview.chromium.org/12817009/diff/45019/ppapi/cpp/file_ref.cc File ppapi/cpp/file_ref.cc (right): https://codereview.chromium.org/12817009/diff/45019/ppapi/cpp/file_ref.cc#newcode110 ppapi/cpp/file_ref.cc:110: if (!has_interface<PPB_FileRef_1_0>()) I guess this (and all other v1.0 ...
7 years, 9 months ago (2013-03-24 08:00:05 UTC) #23
teravest1
On Thu, Mar 21, 2013 at 5:33 PM, Yuzhu Shen <yzshen@google.com> wrote: >> I figure ...
7 years, 9 months ago (2013-03-26 19:23:02 UTC) #24
teravest
On Sun, Mar 24, 2013 at 2:00 AM, <yusukes@chromium.org> wrote: > > https://codereview.chromium.org/12817009/diff/45019/ppapi/cpp/file_ref.cc > File ...
7 years, 9 months ago (2013-03-26 20:12:20 UTC) #25
Yusuke Sato
On 2013/03/26 20:12:20, teravest wrote: > On Sun, Mar 24, 2013 at 2:00 AM, <mailto:yusukes@chromium.org> ...
7 years, 9 months ago (2013-03-26 20:42:59 UTC) #26
teravest
On Tue, Mar 26, 2013 at 2:42 PM, <yusukes@chromium.org> wrote: > On 2013/03/26 20:12:20, teravest ...
7 years, 9 months ago (2013-03-26 21:22:28 UTC) #27
dmichael (off chromium)
On Tue, Mar 26, 2013 at 2:42 PM, <yusukes@chromium.org> wrote: > On 2013/03/26 20:12:20, teravest ...
7 years, 9 months ago (2013-03-26 21:24:27 UTC) #28
yzshen1
Some more comments. Thanks! https://codereview.chromium.org/12817009/diff/64002/ppapi/cpp/file_ref.cc File ppapi/cpp/file_ref.cc (right): https://codereview.chromium.org/12817009/diff/64002/ppapi/cpp/file_ref.cc#newcode51 ppapi/cpp/file_ref.cc:51: else if (has_interface<PPB_FileRef_1_0>()) I remember ...
7 years, 9 months ago (2013-03-26 23:32:42 UTC) #29
teravest
On Tue, Mar 26, 2013 at 5:32 PM, <yzshen@chromium.org> wrote: > Some more comments. > ...
7 years, 9 months ago (2013-03-27 16:35:20 UTC) #30
yzshen1
Thanks Justin! Only two more nits. > Done. I left the braces because the return ...
7 years, 9 months ago (2013-03-27 19:41:22 UTC) #31
teravest
On Wed, Mar 27, 2013 at 1:41 PM, <yzshen@chromium.org> wrote: > Thanks Justin! Only two ...
7 years, 9 months ago (2013-03-27 19:53:57 UTC) #32
dmichael (off chromium)
https://codereview.chromium.org/12817009/diff/79001/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): https://codereview.chromium.org/12817009/diff/79001/ppapi/api/ppb_file_ref.idl#newcode13 ppapi/api/ppb_file_ref.idl:13: M27 = 1.1 (nit: probably M28 now) https://codereview.chromium.org/12817009/diff/79001/ppapi/cpp/file_ref.cc File ...
7 years, 9 months ago (2013-03-27 20:20:06 UTC) #33
teravest
On Wed, Mar 27, 2013 at 2:20 PM, <dmichael@chromium.org> wrote: > > https://codereview.chromium.org/12817009/diff/79001/ppapi/api/ppb_file_ref.idl > File ...
7 years, 9 months ago (2013-03-27 20:38:10 UTC) #34
teravest
On Wed, Mar 27, 2013 at 2:37 PM, Justin TerAvest <teravest@chromium.org> wrote: > On Wed, ...
7 years, 9 months ago (2013-03-27 21:08:13 UTC) #35
dmichael (off chromium)
> There shouldn't be a WeakPtrFactory at all in there anymore. > What's the advantage ...
7 years, 9 months ago (2013-03-27 21:08:54 UTC) #36
teravest1
On Wed, Mar 27, 2013 at 3:08 PM, <dmichael@chromium.org> wrote: >> There shouldn't be a ...
7 years, 9 months ago (2013-03-27 21:20:39 UTC) #37
yzshen1
https://codereview.chromium.org/12817009/diff/79001/webkit/plugins/ppapi/ppb_... > webkit/plugins/ppapi/ppb_file_ref_impl.cc:141: > base::Bind(&GetFileInfoCallback, plugin_instance, file, info, > callback))) > nit: I think the ...
7 years, 9 months ago (2013-03-27 21:28:41 UTC) #38
teravest
On Wed, Mar 27, 2013 at 3:28 PM, <yzshen@chromium.org> wrote: > > https://codereview.chromium.org/12817009/diff/79001/webkit/plugins/ppapi/ppb_... > >> ...
7 years, 9 months ago (2013-03-27 21:32:25 UTC) #39
dmichael (off chromium)
https://codereview.chromium.org/12817009/diff/27004/ppapi/tests/test_file_ref.cc File ppapi/tests/test_file_ref.cc (right): https://codereview.chromium.org/12817009/diff/27004/ppapi/tests/test_file_ref.cc#newcode83 ppapi/tests/test_file_ref.cc:83: // RUN_TEST_FORCEASYNC_AND_NOT(Query, filter); nit: Please remove ^^^ https://codereview.chromium.org/12817009/diff/27004/ppapi/tests/test_utils.h File ...
7 years, 9 months ago (2013-03-27 22:13:55 UTC) #40
teravest1
On Wed, Mar 27, 2013 at 4:13 PM, <dmichael@chromium.org> wrote: > > https://codereview.chromium.org/12817009/diff/27004/ppapi/tests/test_file_ref.cc > File ...
7 years, 9 months ago (2013-03-27 22:26:03 UTC) #41
dmichael (off chromium)
lgtm https://codereview.chromium.org/12817009/diff/93001/webkit/plugins/ppapi/ppb_file_ref_impl.cc File webkit/plugins/ppapi/ppb_file_ref_impl.cc (right): https://codereview.chromium.org/12817009/diff/93001/webkit/plugins/ppapi/ppb_file_ref_impl.cc#newcode95 webkit/plugins/ppapi/ppb_file_ref_impl.cc:95: scoped_refptr<base::MessageLoopProxy> message_loop_proxy, My bad, I think TaskRunner is ...
7 years, 9 months ago (2013-03-27 22:40:21 UTC) #42
yzshen1
LGTM Thanks!
7 years, 9 months ago (2013-03-27 22:46:45 UTC) #43
teravest
On Wed, Mar 27, 2013 at 4:40 PM, <dmichael@chromium.org> wrote: > lgtm > > > ...
7 years, 9 months ago (2013-03-28 14:31:35 UTC) #44
teravest
+jschuh for ppapi/proxy/ppapi_messages.h jschuh, This change makes a few changes to ppapi_messages.h * Existing (PpapiHostMsg_PPBFileRef* ...
7 years, 9 months ago (2013-03-28 14:37:05 UTC) #45
jschuh
Thanks for the front-end explanation. IPC security lgtm.
7 years, 8 months ago (2013-03-31 17:08:56 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/12817009/104001
7 years, 8 months ago (2013-04-01 15:10:29 UTC) #47
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=98505
7 years, 8 months ago (2013-04-01 17:39:24 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/12817009/108003
7 years, 8 months ago (2013-04-01 19:16:26 UTC) #49
commit-bot: I haz the power
Retried try job too often on win for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win&number=60927
7 years, 8 months ago (2013-04-01 19:40:50 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/12817009/113004
7 years, 8 months ago (2013-04-01 19:43:34 UTC) #51
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=129824
7 years, 8 months ago (2013-04-02 03:05:33 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/12817009/113004
7 years, 8 months ago (2013-04-02 03:23:25 UTC) #53
commit-bot: I haz the power
7 years, 8 months ago (2013-04-02 09:10:43 UTC) #54
Message was sent while issue was closed.
Change committed as 191805

Powered by Google App Engine
This is Rietveld 408576698