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

Unified Diff: content/common/net/url_fetcher.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 | « base/file_util_proxy.cc ('k') | webkit/plugins/ppapi/ppb_file_io_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/net/url_fetcher.cc
diff --git a/content/common/net/url_fetcher.cc b/content/common/net/url_fetcher.cc
index 13332af7b1687110e77f3fb70f9d8164e50153e9..6ce9045043079f1ae7f5ba20aa24f34e458386a9 100644
--- a/content/common/net/url_fetcher.cc
+++ b/content/common/net/url_fetcher.cc
@@ -399,13 +399,11 @@ void URLFetcher::Core::TempFileWriter::ContinueWrite(
if (pending_bytes_ > 0) {
base::FileUtilProxy::Write(
- file_message_loop_proxy_,
- temp_file_handle_,
+ file_message_loop_proxy_, temp_file_handle_,
total_bytes_written_, // Append to the end
- (core_->buffer_->data() + buffer_offset_),
- pending_bytes_,
- callback_factory_.NewCallback(
- &URLFetcher::Core::TempFileWriter::ContinueWrite));
+ (core_->buffer_->data() + buffer_offset_), pending_bytes_,
+ base::Bind(&URLFetcher::Core::TempFileWriter::ContinueWrite,
+ weak_factory_.GetWeakPtr()));
} else {
// Finished writing core_->buffer_ to the file. Read some more.
core_->ReadResponse();
« no previous file with comments | « base/file_util_proxy.cc ('k') | webkit/plugins/ppapi/ppb_file_io_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698