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

Unified Diff: ppapi/thunk/ppb_file_ref_thunk.cc

Issue 21966004: Pepper: Move FileRef to the "new" resource proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove code duplication Created 7 years, 4 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
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 beb0e41f5738e96fd7c8060943e684237d54ff11..89b758fbf67c46342e50df70ddd6e201de6819d5 100644
--- a/ppapi/thunk/ppb_file_ref_thunk.cc
+++ b/ppapi/thunk/ppb_file_ref_thunk.cc
@@ -7,6 +7,7 @@
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/private/ppb_file_ref_private.h"
+#include "ppapi/shared_impl/file_ref_create_info.h"
#include "ppapi/shared_impl/proxy_lock.h"
#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/enter.h"
@@ -32,7 +33,12 @@ PP_Resource Create(PP_Resource file_system, const char* path) {
EnterResourceCreationNoLock enter(instance);
if (enter.failed())
return 0;
- return enter.functions()->CreateFileRef(instance, file_system, path);
+ FileRef_CreateInfo info;
+ info.file_system_type = enter_file_system.object()->GetType();
+ info.internal_path = std::string(path);
+ info.pending_host_resource_id = 0;
+ info.file_system_plugin_resource = file_system;
dmichael (off chromium) 2013/08/07 22:19:13 seems like a FileRefCreateInfo constructor would b
teravest 2013/08/08 00:50:06 This is the only place where we have to mess with
+ return enter.functions()->CreateFileRef(instance, info);
}
PP_Bool IsFileRef(PP_Resource resource) {

Powered by Google App Engine
This is Rietveld 408576698