Index: content/common/net/url_fetcher.cc |
diff --git a/content/common/net/url_fetcher.cc b/content/common/net/url_fetcher.cc |
index 7b08df99e3a7d3ad6651d745a755bb5c7cb10928..cda36bb855d0206eed0acca5d3d41d0148bc0516 100644 |
--- a/content/common/net/url_fetcher.cc |
+++ b/content/common/net/url_fetcher.cc |
@@ -351,7 +351,7 @@ void URLFetcher::Core::TempFileWriter::DidCreateTempFile( |
RemoveTempFile(); |
core_->delegate_loop_proxy_->PostTask( |
FROM_HERE, |
- NewRunnableMethod(core_, &Core::InformDelegateFetchIsComplete)); |
+ base::Bind(&Core::InformDelegateFetchIsComplete, core_)); |
return; |
} |
@@ -361,7 +361,7 @@ void URLFetcher::Core::TempFileWriter::DidCreateTempFile( |
core_->io_message_loop_proxy_->PostTask( |
FROM_HERE, |
- NewRunnableMethod(core_, &Core::StartURLRequestWhenAppropriate)); |
+ base::Bind(&Core::StartURLRequestWhenAppropriate, core_)); |
} |
void URLFetcher::Core::TempFileWriter::WriteBuffer(int num_bytes) { |
@@ -385,7 +385,7 @@ void URLFetcher::Core::TempFileWriter::ContinueWrite( |
RemoveTempFile(); |
core_->delegate_loop_proxy_->PostTask( |
FROM_HERE, |
- NewRunnableMethod(core_, &Core::InformDelegateFetchIsComplete)); |
+ base::Bind(&Core::InformDelegateFetchIsComplete, core_)); |
return; |
} |
@@ -438,7 +438,7 @@ void URLFetcher::Core::TempFileWriter::DidCloseTempFile( |
RemoveTempFile(); |
core_->delegate_loop_proxy_->PostTask( |
FROM_HERE, |
- NewRunnableMethod(core_, &Core::InformDelegateFetchIsComplete)); |
+ base::Bind(&Core::InformDelegateFetchIsComplete, core_)); |
return; |
} |
@@ -563,7 +563,7 @@ void URLFetcher::Core::Start() { |
io_message_loop_proxy_->PostTask( |
FROM_HERE, |
- NewRunnableMethod(this, &Core::StartOnIOThread)); |
+ base::Bind(&Core::StartOnIOThread, this)); |
} |
void URLFetcher::Core::StartOnIOThread() { |
@@ -597,7 +597,7 @@ void URLFetcher::Core::Stop() { |
fetcher_ = NULL; |
if (io_message_loop_proxy_.get()) { |
io_message_loop_proxy_->PostTask( |
- FROM_HERE, NewRunnableMethod(this, &Core::CancelURLRequest)); |
+ FROM_HERE, base::Bind(&Core::CancelURLRequest, this)); |
} |
} |
@@ -605,7 +605,7 @@ void URLFetcher::Core::ReceivedContentWasMalformed() { |
DCHECK(delegate_loop_proxy_->BelongsToCurrentThread()); |
if (io_message_loop_proxy_.get()) { |
io_message_loop_proxy_->PostTask( |
- FROM_HERE, NewRunnableMethod(this, &Core::NotifyMalformedContent)); |
+ FROM_HERE, base::Bind(&Core::NotifyMalformedContent, this)); |
} |
} |
@@ -642,8 +642,8 @@ void URLFetcher::Core::AppendChunkToUpload(const std::string& content, |
CHECK(io_message_loop_proxy_.get()); |
io_message_loop_proxy_->PostTask( |
FROM_HERE, |
- NewRunnableMethod(this, &Core::CompleteAddingUploadDataChunk, content, |
- is_last_chunk)); |
+ base::Bind(&Core::CompleteAddingUploadDataChunk, this, |
+ content, is_last_chunk)); |
} |
// Return true if the write was done and reading may continue. |
@@ -745,9 +745,8 @@ void URLFetcher::Core::RetryOrCompleteUrlFetch() { |
request_context_getter_ = NULL; |
bool posted = delegate_loop_proxy_->PostTask( |
FROM_HERE, |
- NewRunnableMethod(this, |
- &Core::OnCompletedURLRequest, |
- backoff_delay)); |
+ base::Bind(&Core::OnCompletedURLRequest, this, |
+ backoff_delay)); |
// If the delegate message loop does not exist any more, then the delegate |
// should be gone too. |
@@ -851,7 +850,7 @@ void URLFetcher::Core::StartURLRequestWhenAppropriate() { |
} else { |
MessageLoop::current()->PostDelayedTask( |
FROM_HERE, |
- NewRunnableMethod(this, &Core::StartURLRequest), |
+ base::Bind(&Core::StartURLRequest, this), |
delay); |
} |
} |
@@ -1118,7 +1117,7 @@ bool URLFetcher::GetResponseAsFilePath(bool take_ownership, |
if (take_ownership) { |
core_->io_message_loop_proxy_->PostTask( |
FROM_HERE, |
- NewRunnableMethod(core_.get(), &Core::DisownTempFile)); |
+ base::Bind(&Core::DisownTempFile, core_)); |
} |
return true; |
} |