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

Unified Diff: ppapi/thunk/ppb_file_ref_thunk.cc

Issue 113363004: PPAPI: Add new PPB_FileRef.MakeDirectory to support exclusive operation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/thunk/ppb_file_ref_api.h ('k') | ppapi/thunk/thunk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_file_ref_thunk.cc
diff --git a/ppapi/thunk/ppb_file_ref_thunk.cc b/ppapi/thunk/ppb_file_ref_thunk.cc
index 64c90b55dbcea674f9c3d5e7b104e7efb76fad24..ef31e9227c306ae66e40fe891fea497007a75b45 100644
--- a/ppapi/thunk/ppb_file_ref_thunk.cc
+++ b/ppapi/thunk/ppb_file_ref_thunk.cc
@@ -87,8 +87,21 @@ int32_t MakeDirectory(PP_Resource directory_ref,
EnterFileRef enter(directory_ref, callback, true);
if (enter.failed())
return enter.retval();
- return enter.SetResult(enter.object()->MakeDirectory(make_ancestors,
- enter.callback()));
+ 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()));
}
int32_t Touch(PP_Resource file_ref,
@@ -180,6 +193,21 @@ 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
};
@@ -194,6 +222,10 @@ 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;
}
« no previous file with comments | « ppapi/thunk/ppb_file_ref_api.h ('k') | ppapi/thunk/thunk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698