diff options
author | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 11:09:20 +0000 |
---|---|---|
committer | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 11:09:20 +0000 |
commit | e9c0335ee03f14e4f6577dec8d2f9c5744bc577f (patch) | |
tree | 1b5cab9e9df0d300de040d132aecb8a0573e94f5 /ppapi/thunk | |
parent | 0efdfd734dda4fcd167d66fb4225fd42c8d7fa02 (diff) | |
download | chromium_src-e9c0335ee03f14e4f6577dec8d2f9c5744bc577f.zip chromium_src-e9c0335ee03f14e4f6577dec8d2f9c5744bc577f.tar.gz chromium_src-e9c0335ee03f14e4f6577dec8d2f9c5744bc577f.tar.bz2 |
Revert 243802 "PPAPI: Add new PPB_FileRef.MakeDirectory to suppo..."
This breaks examples of NaCl SDK.
http://build.chromium.org/p/client.nacl.sdk/builders/mac-sdk-multi/builds/6796
> 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
>
> Review URL: https://codereview.chromium.org/113363004
TBR=nhiroki@chromium.org
Review URL: https://codereview.chromium.org/131473002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243842 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r-- | ppapi/thunk/interfaces_ppb_public_dev_channel.h | 1 | ||||
-rw-r--r-- | ppapi/thunk/ppb_file_ref_api.h | 2 | ||||
-rw-r--r-- | ppapi/thunk/ppb_file_ref_thunk.cc | 36 | ||||
-rw-r--r-- | ppapi/thunk/thunk.h | 1 |
4 files changed, 3 insertions, 37 deletions
diff --git a/ppapi/thunk/interfaces_ppb_public_dev_channel.h b/ppapi/thunk/interfaces_ppb_public_dev_channel.h index 43c16b5..a70442b 100644 --- a/ppapi/thunk/interfaces_ppb_public_dev_channel.h +++ b/ppapi/thunk/interfaces_ppb_public_dev_channel.h @@ -8,6 +8,5 @@ #include "ppapi/thunk/interfaces_preamble.h" // Interfaces go here. -PROXIED_IFACE(PPB_FILEREF_INTERFACE_1_2, PPB_FileRef_1_2) #include "ppapi/thunk/interfaces_postamble.h" diff --git a/ppapi/thunk/ppb_file_ref_api.h b/ppapi/thunk/ppb_file_ref_api.h index 2a27af5e8..b473ae2 100644 --- a/ppapi/thunk/ppb_file_ref_api.h +++ b/ppapi/thunk/ppb_file_ref_api.h @@ -28,7 +28,7 @@ class PPAPI_THUNK_EXPORT PPB_FileRef_API { virtual PP_Var GetName() const = 0; virtual PP_Var GetPath() const = 0; virtual PP_Resource GetParent() = 0; - virtual int32_t MakeDirectory(int32_t make_directory_flags, + virtual int32_t MakeDirectory(PP_Bool make_ancestors, scoped_refptr<TrackedCallback> callback) = 0; virtual int32_t Touch(PP_Time last_access_time, PP_Time last_modified_time, diff --git a/ppapi/thunk/ppb_file_ref_thunk.cc b/ppapi/thunk/ppb_file_ref_thunk.cc index ef31e922..64c90b5 100644 --- a/ppapi/thunk/ppb_file_ref_thunk.cc +++ b/ppapi/thunk/ppb_file_ref_thunk.cc @@ -87,21 +87,8 @@ int32_t MakeDirectory(PP_Resource directory_ref, EnterFileRef enter(directory_ref, callback, true); if (enter.failed()) return enter.retval(); - int32_t flag = make_ancestors ? PP_MAKEDIRECTORYFLAG_WITH_ANCESTORS - : PP_MAKEDIRECTORYFLAG_NONE; - return enter.SetResult(enter.object()->MakeDirectory( - flag, enter.callback())); -} - -int32_t MakeDirectory_1_2(PP_Resource directory_ref, - int32_t make_directory_flags, - PP_CompletionCallback callback) { - VLOG(4) << "PPB_FileRef::MakeDirectory()"; - EnterFileRef enter(directory_ref, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->MakeDirectory( - make_directory_flags, enter.callback())); + return enter.SetResult(enter.object()->MakeDirectory(make_ancestors, + enter.callback())); } int32_t Touch(PP_Resource file_ref, @@ -193,21 +180,6 @@ const PPB_FileRef_1_1 g_ppb_file_ref_thunk_1_1 = { &ReadDirectoryEntries }; -const PPB_FileRef_1_2 g_ppb_file_ref_thunk_1_2 = { - &Create, - &IsFileRef, - &GetFileSystemType, - &GetName, - &GetPath, - &GetParent, - &MakeDirectory_1_2, - &Touch, - &Delete, - &Rename, - &Query, - &ReadDirectoryEntries -}; - const PPB_FileRefPrivate g_ppb_file_ref_private_thunk = { &GetAbsolutePath }; @@ -222,10 +194,6 @@ const PPB_FileRef_1_1* GetPPB_FileRef_1_1_Thunk() { return &g_ppb_file_ref_thunk_1_1; } -const PPB_FileRef_1_2* GetPPB_FileRef_1_2_Thunk() { - return &g_ppb_file_ref_thunk_1_2; -} - const PPB_FileRefPrivate_0_1* GetPPB_FileRefPrivate_0_1_Thunk() { return &g_ppb_file_ref_private_thunk; } diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h index a85ce77..86a328f 100644 --- a/ppapi/thunk/thunk.h +++ b/ppapi/thunk/thunk.h @@ -25,7 +25,6 @@ #include "ppapi/thunk/interfaces_ppb_private_flash.h" #include "ppapi/thunk/interfaces_ppb_public_stable.h" #include "ppapi/thunk/interfaces_ppb_public_dev.h" -#include "ppapi/thunk/interfaces_ppb_public_dev_channel.h" #undef UNPROXIED_IFACE #undef PROXIED_IFACE |