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

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

Issue 8321014: base::Bind: Convert FileUtilProxy::WriteCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fixes. 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
« no previous file with comments | « content/common/net/url_fetcher.cc ('k') | webkit/plugins/ppapi/quota_file_io.h » ('j') | 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 26f0154c794f4d63b2d42bf95d513efdf0d1c89a..62c47157c58bb21614bbcac59d5027771b86c885 100644
--- a/webkit/plugins/ppapi/ppb_file_io_impl.cc
+++ b/webkit/plugins/ppapi/ppb_file_io_impl.cc
@@ -201,13 +201,15 @@ int32_t PPB_FileIO_Impl::Write(int64_t offset,
if (quota_file_io_.get()) {
if (!quota_file_io_->Write(
offset, buffer, bytes_to_write,
- callback_factory_.NewCallback(&PPB_FileIO_Impl::WriteCallback)))
+ base::Bind(&PPB_FileIO_Impl::WriteCallback,
+ weak_factory_.GetWeakPtr())))
return PP_ERROR_FAILED;
} else {
if (!base::FileUtilProxy::Write(
- plugin_delegate->GetFileThreadMessageLoopProxy(),
- file_, offset, buffer, bytes_to_write,
- callback_factory_.NewCallback(&PPB_FileIO_Impl::WriteCallback)))
+ plugin_delegate->GetFileThreadMessageLoopProxy(), file_, offset,
+ buffer, bytes_to_write,
+ base::Bind(&PPB_FileIO_Impl::WriteCallback,
+ weak_factory_.GetWeakPtr())))
return PP_ERROR_FAILED;
}
@@ -292,7 +294,8 @@ int32_t PPB_FileIO_Impl::WillWrite(int64_t offset,
if (!quota_file_io_->WillWrite(
offset, bytes_to_write,
- callback_factory_.NewCallback(&PPB_FileIO_Impl::WillWriteCallback)))
+ base::Bind(&PPB_FileIO_Impl::WillWriteCallback,
+ weak_factory_.GetWeakPtr())))
return PP_ERROR_FAILED;
RegisterCallback(OPERATION_EXCLUSIVE, callback, NULL);
« no previous file with comments | « content/common/net/url_fetcher.cc ('k') | webkit/plugins/ppapi/quota_file_io.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698