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

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: 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
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..188174538b1666b07cabe46950924736e27f3a07 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, false);
yzshen1 2013/04/08 21:05:16 nit: shall we use 'true' instead of 'false' here?
victorhsieh 2013/04/08 23:44:38 Done.
+ 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) {

Powered by Google App Engine
This is Rietveld 408576698