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

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

Issue 8294015: base::Bind: Convert FileUtilProxy::ReadCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix. Created 9 years, 2 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
« base/file_util_proxy.h ('K') | « base/file_util_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_file_io_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_file_io_impl.cc b/webkit/plugins/ppapi/ppb_file_io_impl.cc
index 7cd8263de16fde3a4084788870ffacc0b306b196..26f0154c794f4d63b2d42bf95d513efdf0d1c89a 100644
--- a/webkit/plugins/ppapi/ppb_file_io_impl.cc
+++ b/webkit/plugins/ppapi/ppb_file_io_impl.cc
@@ -176,9 +176,10 @@ int32_t PPB_FileIO_Impl::Read(int64_t offset,
return PP_ERROR_FAILED;
if (!base::FileUtilProxy::Read(
- plugin_delegate->GetFileThreadMessageLoopProxy(),
- file_, offset, bytes_to_read,
- callback_factory_.NewCallback(&PPB_FileIO_Impl::ReadCallback)))
+ plugin_delegate->GetFileThreadMessageLoopProxy(), file_, offset,
+ bytes_to_read,
+ base::Bind(&PPB_FileIO_Impl::ReadCallback,
+ weak_factory_.GetWeakPtr())))
return PP_ERROR_FAILED;
RegisterCallback(OPERATION_READ, callback, buffer);
« base/file_util_proxy.h ('K') | « base/file_util_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698