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

Unified Diff: ppapi/thunk/ppb_file_ref_thunk.cc

Issue 13726024: Refactor FileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NON_EXPORTED_BASE Created 7 years, 8 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/interfaces_ppb_public_stable.h ('k') | ppapi/thunk/resource_creation_api.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 4e61cd666d895100514d2a24aca0dd8e57f7ec93..3c56c5cabc3cfbea44e6ca15773bf0f965f55481 100644
--- a/ppapi/thunk/ppb_file_ref_thunk.cc
+++ b/ppapi/thunk/ppb_file_ref_thunk.cc
@@ -12,6 +12,7 @@
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/thunk.h"
#include "ppapi/thunk/ppb_file_ref_api.h"
+#include "ppapi/thunk/ppb_file_system_api.h"
#include "ppapi/thunk/resource_creation_api.h"
namespace ppapi {
@@ -23,14 +24,14 @@ typedef EnterResource<PPB_FileRef_API> EnterFileRef;
PP_Resource Create(PP_Resource file_system, const char* path) {
ppapi::ProxyAutoLock lock;
- Resource* object =
- PpapiGlobals::Get()->GetResourceTracker()->GetResource(file_system);
- if (!object)
+ EnterResourceNoLock<PPB_FileSystem_API> enter_file_system(file_system, true);
+ if (enter_file_system.failed())
return 0;
- EnterResourceCreationNoLock enter(object->pp_instance());
+ PP_Instance instance = enter_file_system.resource()->pp_instance();
+ EnterResourceCreationNoLock enter(instance);
if (enter.failed())
return 0;
- return enter.functions()->CreateFileRef(file_system, path);
+ return enter.functions()->CreateFileRef(instance, file_system, path);
}
PP_Bool IsFileRef(PP_Resource resource) {
« no previous file with comments | « ppapi/thunk/interfaces_ppb_public_stable.h ('k') | ppapi/thunk/resource_creation_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698