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

Unified Diff: webkit/plugins/ppapi/ppb_directory_reader_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_directory_reader_impl.h ('k') | webkit/plugins/ppapi/ppb_file_chooser_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_directory_reader_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_directory_reader_impl.cc b/webkit/plugins/ppapi/ppb_directory_reader_impl.cc
index 2f381217fdd365c490f6e7e77b7f65c519c173af..ec1315ea6161e8d8cd50dfcd6b6bc19e13b84613 100644
--- a/webkit/plugins/ppapi/ppb_directory_reader_impl.cc
+++ b/webkit/plugins/ppapi/ppb_directory_reader_impl.cc
@@ -23,6 +23,7 @@
#include "webkit/plugins/ppapi/resource_helper.h"
using ::ppapi::PpapiGlobals;
+using ::ppapi::TrackedCallback;
using ::ppapi::thunk::EnterResourceNoLock;
using ::ppapi::thunk::PPB_DirectoryReader_API;
using ::ppapi::thunk::PPB_FileRef_API;
@@ -80,9 +81,7 @@ PPB_DirectoryReader_API* PPB_DirectoryReader_Impl::AsPPB_DirectoryReader_API() {
int32_t PPB_DirectoryReader_Impl::GetNextEntry(
PP_DirectoryEntry_Dev* entry,
- PP_CompletionCallback callback) {
- if (!callback.func)
- return PP_ERROR_BLOCKS_MAIN_THREAD;
+ scoped_refptr<TrackedCallback> callback) {
if (directory_ref_->GetFileSystemType() == PP_FILESYSTEMTYPE_EXTERNAL)
return PP_ERROR_FAILED;
« no previous file with comments | « webkit/plugins/ppapi/ppb_directory_reader_impl.h ('k') | webkit/plugins/ppapi/ppb_file_chooser_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698