| Index: components/cronet/android/url_request_adapter.cc
|
| diff --git a/components/cronet/android/url_request_adapter.cc b/components/cronet/android/url_request_adapter.cc
|
| index 9d9e29b2ce3258ab2a86ee8e506eb99426c7731c..ff98f9098689d115e20165e01ab3c4ce695a616f 100644
|
| --- a/components/cronet/android/url_request_adapter.cc
|
| +++ b/components/cronet/android/url_request_adapter.cc
|
| @@ -76,13 +76,11 @@ void URLRequestAdapter::AppendChunk(const char* bytes, int bytes_len,
|
| VLOG(1) << "AppendChunk, len: " << bytes_len << ", last: " << is_last_chunk;
|
| scoped_ptr<char[]> buf(new char[bytes_len]);
|
| memcpy(buf.get(), bytes, bytes_len);
|
| - context_->GetNetworkTaskRunner()->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&URLRequestAdapter::OnAppendChunk,
|
| - base::Unretained(this),
|
| - Passed(buf.Pass()),
|
| - bytes_len,
|
| - is_last_chunk));
|
| + context_->RunTask(base::Bind(&URLRequestAdapter::OnAppendChunk,
|
| + base::Unretained(this),
|
| + Passed(buf.Pass()),
|
| + bytes_len,
|
| + is_last_chunk));
|
| }
|
|
|
| std::string URLRequestAdapter::GetHeader(const std::string& name) const {
|
| @@ -107,10 +105,8 @@ std::string URLRequestAdapter::GetNegotiatedProtocol() const {
|
| }
|
|
|
| void URLRequestAdapter::Start() {
|
| - context_->GetNetworkTaskRunner()->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&URLRequestAdapter::OnInitiateConnection,
|
| - base::Unretained(this)));
|
| + context_->RunTask(base::Bind(&URLRequestAdapter::OnInitiateConnection,
|
| + base::Unretained(this)));
|
| }
|
|
|
| void URLRequestAdapter::OnAppendChunk(const scoped_ptr<char[]> bytes,
|
| @@ -158,8 +154,7 @@ void URLRequestAdapter::Cancel() {
|
|
|
| canceled_ = true;
|
|
|
| - context_->GetNetworkTaskRunner()->PostTask(
|
| - FROM_HERE,
|
| + context_->RunTask(
|
| base::Bind(&URLRequestAdapter::OnCancelRequest, base::Unretained(this)));
|
| }
|
|
|
|
|