| 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();
|
|
|