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

Unified Diff: webkit/plugins/ppapi/ppb_file_system_impl.cc

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated TestURLLoader to test blocking callbacks. Created 8 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: webkit/plugins/ppapi/ppb_file_system_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_file_system_impl.cc b/webkit/plugins/ppapi/ppb_file_system_impl.cc
index 9428e3a4b65aad2dc79e66f77cae04cdd625ef0a..4be600206df571d2981f14f6411360c871e18ccb 100644
--- a/webkit/plugins/ppapi/ppb_file_system_impl.cc
+++ b/webkit/plugins/ppapi/ppb_file_system_impl.cc
@@ -20,6 +20,7 @@
#include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
#include "webkit/plugins/ppapi/resource_helper.h"
+using ppapi::ApiCallbackType;
using ppapi::thunk::PPB_FileSystem_API;
namespace webkit {
@@ -52,10 +53,7 @@ PPB_FileSystem_API* PPB_FileSystem_Impl::AsPPB_FileSystem_API() {
}
int32_t PPB_FileSystem_Impl::Open(int64_t expected_size,
- PP_CompletionCallback callback) {
- if (!callback.func)
- return PP_ERROR_BLOCKS_MAIN_THREAD;
-
+ ::ppapi::ApiCallbackType callback) {
// Should not allow multiple opens.
if (called_open_)
return PP_ERROR_INPROGRESS;
@@ -81,10 +79,10 @@ int32_t PPB_FileSystem_Impl::Open(int64_t expected_size,
return PP_ERROR_FAILED;
if (!plugin_instance->delegate()->OpenFileSystem(
- plugin_instance->container()->element().document().url(),
- file_system_type, expected_size,
- new FileCallbacks(this, callback, NULL,
- scoped_refptr<PPB_FileSystem_Impl>(this), NULL)))
+ plugin_instance->container()->element().document().url(),
+ file_system_type, expected_size,
+ new FileCallbacks(this, callback, NULL,
+ scoped_refptr<PPB_FileSystem_Impl>(this), NULL)))
return PP_ERROR_FAILED;
return PP_OK_COMPLETIONPENDING;
}

Powered by Google App Engine
This is Rietveld 408576698