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

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: Created 7 years 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
« ppapi/cpp/file_ref.h ('K') | « ppapi/thunk/ppb_file_ref_api.h ('k') | no next file » | 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..7b3e474ebb54e08b41400e7f94295fbafac3a308 100644
--- a/ppapi/thunk/ppb_file_ref_thunk.cc
+++ b/ppapi/thunk/ppb_file_ref_thunk.cc
@@ -87,8 +87,19 @@ 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()));
+ return enter.SetResult(enter.object()->MakeDirectory(
+ PP_FALSE, make_ancestors, enter.callback()));
+}
+
+int32_t MakeDirectoryExclusive(PP_Resource directory_ref,
+ PP_Bool make_ancestors,
+ 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(
+ PP_TRUE, make_ancestors, enter.callback()));
}
int32_t Touch(PP_Resource file_ref,
@@ -180,6 +191,22 @@ 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,
+ &MakeDirectoryExclusive,
+ &Touch,
+ &Delete,
+ &Rename,
+ &Query,
+ &ReadDirectoryEntries
+};
+
const PPB_FileRefPrivate g_ppb_file_ref_private_thunk = {
&GetAbsolutePath
};
@@ -194,6 +221,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;
}
« ppapi/cpp/file_ref.h ('K') | « ppapi/thunk/ppb_file_ref_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698