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

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: export AssertLockHeld Created 8 years, 6 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 | « webkit/plugins/ppapi/ppb_file_system_impl.h ('k') | webkit/plugins/ppapi/ppb_flash_menu_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ae9edeb848c55f9428cb7164e7038a7bd61aac81 100644
--- a/webkit/plugins/ppapi/ppb_file_system_impl.cc
+++ b/webkit/plugins/ppapi/ppb_file_system_impl.cc
@@ -21,6 +21,7 @@
#include "webkit/plugins/ppapi/resource_helper.h"
using ppapi::thunk::PPB_FileSystem_API;
+using ppapi::TrackedCallback;
namespace webkit {
namespace ppapi {
@@ -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;
-
+ scoped_refptr<TrackedCallback> 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;
}
« no previous file with comments | « webkit/plugins/ppapi/ppb_file_system_impl.h ('k') | webkit/plugins/ppapi/ppb_flash_menu_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698