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

Issue 113363004: PPAPI: Add new PPB_FileRef.MakeDirectory to support exclusive operation (Closed)

Created:
7 years ago by nhiroki
Modified:
6 years, 11 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, jam, yzshen+watch_chromium.org, joi+watch-content_chromium.org, teravest+watch_chromium.org, darin-cc_chromium.org, raymes+watch_chromium.org, nfullagar1, piman+watch_chromium.org, noelallen1, binji, ihf+watch_chromium.org, Yusuke Sato, hidehiko, kinuko
Visibility:
Public.

Description

PPAPI: Add new PPB_FileRef.MakeDirectory to support exclusive operation Current PPB_FileRef.MakeDirectory returns PP_OK if a directory exists on the given path. This makes it difficult to create POSIX compatible API on top of PPAPI. This change introduces new PPB_FileRef.MakeDirectory as dev channel API. That makes a new directory according to the given PP_MakeDirectoryFlags values. The flags provide exclusive operation option. If exclusive flag is specified and a directory exists on the given path, the function fails and returns PP_ERROR_FILEEXISTS. BUG=314879 TEST=browser_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243802

Patch Set 1 : #

Total comments: 4

Patch Set 2 : merge MakeDirectory*() into MakeDirectory() #

Total comments: 9

Patch Set 3 : rebase #

Patch Set 4 : review fix #

Total comments: 9

Patch Set 5 : use PP_MakeDirectoryFlags instead of multiple args #

Patch Set 6 : fix win build #

Total comments: 16

Patch Set 7 : include interfaces_ppb_public_dev_channel.h #

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+380 lines, -116 lines) Patch
M chrome/browser/component_updater/ppapi_utils.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_external_file_ref_backend.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_external_file_ref_backend.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_file_ref_host.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_file_ref_host.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M content/renderer/pepper/plugin_module.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
M ppapi/api/ppb_file_ref.idl View 1 2 3 4 5 6 2 chunks +42 lines, -1 line 0 comments Download
M ppapi/c/ppb_file_ref.h View 1 2 3 4 5 6 7 chunks +63 lines, -15 lines 0 comments Download
M ppapi/cpp/file_ref.h View 1 2 3 4 5 6 1 chunk +9 lines, -19 lines 0 comments Download
M ppapi/cpp/file_ref.cc View 1 2 3 4 5 6 12 chunks +65 lines, -26 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 3 4 5 6 7 5 chunks +87 lines, -0 lines 0 comments Download
M ppapi/proxy/file_ref_resource.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/proxy/file_ref_resource.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/proxy/interface_list.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -6 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ppapi/tests/test_file_io.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M ppapi/tests/test_file_ref.cc View 1 2 3 4 8 chunks +51 lines, -26 lines 0 comments Download
M ppapi/thunk/interfaces_ppb_public_dev_channel.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/thunk/ppb_file_ref_api.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ppapi/thunk/ppb_file_ref_thunk.cc View 1 2 3 4 3 chunks +34 lines, -2 lines 0 comments Download
M ppapi/thunk/thunk.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
nhiroki
Hi Dave, can you review this? yusukes@ and his team need this feature. Thanks!
7 years ago (2013-12-19 08:55:02 UTC) #1
dmichael (off chromium)
I'm not going to be super responsive today, so +teravest@chromium.org.
7 years ago (2013-12-19 17:05:34 UTC) #2
teravest
https://codereview.chromium.org/113363004/diff/110001/ppapi/cpp/file_ref.h File ppapi/cpp/file_ref.h (right): https://codereview.chromium.org/113363004/diff/110001/ppapi/cpp/file_ref.h#newcode131 ppapi/cpp/file_ref.h:131: int32_t MakeDirectoryExclusive(PP_Bool make_ancestors, It's sad that this looks different ...
7 years ago (2013-12-19 17:18:19 UTC) #3
raymes
https://codereview.chromium.org/113363004/diff/110001/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): https://codereview.chromium.org/113363004/diff/110001/ppapi/api/ppb_file_ref.idl#newcode136 ppapi/api/ppb_file_ref.idl:136: int32_t MakeDirectoryExclusive([in] PP_Resource directory_ref, Can we instead just add ...
7 years ago (2013-12-19 23:10:22 UTC) #4
teravest
On Thu, Dec 19, 2013 at 4:10 PM, <raymes@chromium.org> wrote: > > https://codereview.chromium.org/113363004/diff/110001/ppapi/api/ppb_file_ref.idl > File ...
7 years ago (2013-12-19 23:12:19 UTC) #5
raymes
Also since this is changing the stable API it will have to go through API ...
7 years ago (2013-12-19 23:14:48 UTC) #6
raymes
I don't think there is a good way besides making a comment that it is ...
7 years ago (2013-12-19 23:49:16 UTC) #7
yzshen1
On 2013/12/19 23:49:16, raymes wrote: > I don't think there is a good way besides ...
7 years ago (2013-12-20 00:31:14 UTC) #8
nhiroki
Thanks, guys! Added comments only. On 2013/12/19 23:14:48, raymes wrote: > Also since this is ...
7 years ago (2013-12-20 01:54:20 UTC) #9
nhiroki
Updated. Can you take another look?
7 years ago (2013-12-20 11:05:41 UTC) #10
yzshen1
(drive-by comments; I only looked at the IDL and cpp API) https://codereview.chromium.org/113363004/diff/130001/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): ...
7 years ago (2013-12-20 18:18:54 UTC) #11
yzshen1
https://codereview.chromium.org/113363004/diff/130001/ppapi/cpp/file_ref.cc File ppapi/cpp/file_ref.cc (right): https://codereview.chromium.org/113363004/diff/130001/ppapi/cpp/file_ref.cc#newcode40 ppapi/cpp/file_ref.cc:40: if (has_interface<PPB_FileRef_1_1>()) { Please also check 1_2 first. https://codereview.chromium.org/113363004/diff/130001/ppapi/cpp/file_ref.cc#newcode123 ...
7 years ago (2013-12-20 18:23:56 UTC) #12
yzshen1
7 years ago (2013-12-20 18:23:59 UTC) #13
raymes
https://codereview.chromium.org/113363004/diff/130001/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): https://codereview.chromium.org/113363004/diff/130001/ppapi/api/ppb_file_ref.idl#newcode115 ppapi/api/ppb_file_ref.idl:115: int32_t MakeDirectory([in] PP_Resource directory_ref, I think we probably want ...
7 years ago (2013-12-22 23:07:36 UTC) #14
raymes
On Fri, Dec 20, 2013 at 12:54 PM, <nhiroki@chromium.org> wrote: > Thanks, guys! Added comments ...
7 years ago (2013-12-22 23:12:59 UTC) #15
nhiroki
Updated. Can you take another look? Thanks! https://codereview.chromium.org/113363004/diff/130001/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): https://codereview.chromium.org/113363004/diff/130001/ppapi/api/ppb_file_ref.idl#newcode14 ppapi/api/ppb_file_ref.idl:14: M34 = ...
6 years, 11 months ago (2014-01-06 13:24:21 UTC) #16
nhiroki
On 2013/12/22 23:12:59, raymes wrote: > On Fri, Dec 20, 2013 at 12:54 PM, <mailto:nhiroki@chromium.org> ...
6 years, 11 months ago (2014-01-06 13:25:59 UTC) #17
yzshen1
https://codereview.chromium.org/113363004/diff/130001/ppapi/cpp/file_ref.cc File ppapi/cpp/file_ref.cc (right): https://codereview.chromium.org/113363004/diff/130001/ppapi/cpp/file_ref.cc#newcode123 ppapi/cpp/file_ref.cc:123: pp_resource(), On 2014/01/06 13:24:22, nhiroki wrote: > On 2013/12/20 ...
6 years, 11 months ago (2014-01-06 17:53:15 UTC) #18
dmichael (off chromium)
https://codereview.chromium.org/113363004/diff/610001/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): https://codereview.chromium.org/113363004/diff/610001/ppapi/api/ppb_file_ref.idl#newcode142 ppapi/api/ppb_file_ref.idl:142: [in] PP_Bool make_ancestors, At this point, might it make ...
6 years, 11 months ago (2014-01-06 18:08:09 UTC) #19
yzshen1
https://codereview.chromium.org/113363004/diff/610001/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): https://codereview.chromium.org/113363004/diff/610001/ppapi/api/ppb_file_ref.idl#newcode142 ppapi/api/ppb_file_ref.idl:142: [in] PP_Bool make_ancestors, I like your idea. Thanks! On ...
6 years, 11 months ago (2014-01-06 18:44:10 UTC) #20
nhiroki
Thanks! Updated. https://codereview.chromium.org/113363004/diff/610001/ppapi/api/ppb_file_ref.idl File ppapi/api/ppb_file_ref.idl (right): https://codereview.chromium.org/113363004/diff/610001/ppapi/api/ppb_file_ref.idl#newcode142 ppapi/api/ppb_file_ref.idl:142: [in] PP_Bool make_ancestors, On 2014/01/06 18:44:11, yzshen1 ...
6 years, 11 months ago (2014-01-07 07:32:44 UTC) #21
nhiroki
Hi, can I ask a question? After moving to dev_channel interface (PatchSet 5), OutOfProcessPPAPITest.FileRef still ...
6 years, 11 months ago (2014-01-07 09:41:25 UTC) #22
yzshen1
> After moving to dev_channel interface (PatchSet 5), > OutOfProcessPPAPITest.FileRef still works fine with PPB_FileRef_1_2, ...
6 years, 11 months ago (2014-01-07 17:59:22 UTC) #23
teravest
On Tue, Jan 7, 2014 at 10:59 AM, <yzshen@chromium.org> wrote: >> After moving to dev_channel ...
6 years, 11 months ago (2014-01-07 18:15:01 UTC) #24
yzshen1
> > > > I think that is because we don't support dev-channel APIs in-process. ...
6 years, 11 months ago (2014-01-07 18:19:41 UTC) #25
dmichael (off chromium)
I noticed this as well while working on Map. I think we're missing including interfaces_ppb_public_dev_channel.h ...
6 years, 11 months ago (2014-01-07 18:35:56 UTC) #26
dmichael (off chromium)
Thanks! I don't think I have anything to add over Yuzhu's comments. lgtm when he's ...
6 years, 11 months ago (2014-01-07 21:03:42 UTC) #27
nhiroki
+tsepez@, Hi Tom, can you review ppapi_messages.h? This replaces a bool flag with a bit-field ...
6 years, 11 months ago (2014-01-08 01:27:36 UTC) #28
nhiroki
Thanks guys! As dmichael@ mentioned, missing the dev_channel header file caused in-process test failure. The ...
6 years, 11 months ago (2014-01-08 06:11:04 UTC) #29
nhiroki
Forgot to publish comments... https://codereview.chromium.org/113363004/diff/1060001/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.h File content/browser/renderer_host/pepper/pepper_external_file_ref_backend.h (right): https://codereview.chromium.org/113363004/diff/1060001/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.h#newcode31 content/browser/renderer_host/pepper/pepper_external_file_ref_backend.h:31: int32_t make_directory_flags) OVERRIDE; On 2014/01/07 ...
6 years, 11 months ago (2014-01-08 06:12:32 UTC) #30
yzshen1
LGTM Thanks!
6 years, 11 months ago (2014-01-08 17:30:52 UTC) #31
Tom Sepez
Messages LGTM
6 years, 11 months ago (2014-01-08 20:10:20 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nhiroki@chromium.org/113363004/1480001
6 years, 11 months ago (2014-01-09 05:04:48 UTC) #33
commit-bot: I haz the power
Failed to apply patch for ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 11 months ago (2014-01-09 05:04:57 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nhiroki@chromium.org/113363004/1810001
6 years, 11 months ago (2014-01-09 05:27:13 UTC) #35
commit-bot: I haz the power
6 years, 11 months ago (2014-01-09 07:45:33 UTC) #36
Message was sent while issue was closed.
Change committed as 243802

Powered by Google App Engine
This is Rietveld 408576698