Chromium Code Reviews| Index: net/url_request/url_request_http_job.cc |
| diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc |
| index 309f0fba8e281494b2c214cc74bfa3f5f1254945..d2d522fe5759e4a743209f10c768b76b5e92c77a 100644 |
| --- a/net/url_request/url_request_http_job.cc |
| +++ b/net/url_request/url_request_http_job.cc |
| @@ -342,11 +342,12 @@ void URLRequestHttpJob::StartTransaction() { |
| request_, notify_before_headers_sent_callback_, |
| &request_info_.extra_headers); |
| // If an extension blocks the request, we rely on the callback to |
|
mmenke
2012/09/07 17:27:51
Need a complete sentence here. "... the callback
vabr (Chromium)
2012/09/10 15:32:59
Oops, I deleted that by mistake. Restored the orig
|
| - // StartTransactionInternal(). |
| if (rv == ERR_IO_PENDING) { |
| SetBlockedOnDelegate(); |
| return; |
| } |
| + MaybeStartTransactionInternal(rv); |
| + return; |
| } |
| StartTransactionInternal(); |
| } |
| @@ -357,6 +358,10 @@ void URLRequestHttpJob::NotifyBeforeSendHeadersCallback(int result) { |
| // Check that there are no callbacks to already canceled requests. |
| DCHECK_NE(URLRequestStatus::CANCELED, GetStatus().status()); |
| + MaybeStartTransactionInternal(result); |
| +} |
| + |
| +void URLRequestHttpJob::MaybeStartTransactionInternal(int result) { |
| if (result == OK) { |
| StartTransactionInternal(); |
| } else { |
| @@ -364,6 +369,7 @@ void URLRequestHttpJob::NotifyBeforeSendHeadersCallback(int result) { |
| request_->net_log().AddEvent(NetLog::TYPE_CANCELLED, |
| NetLog::StringCallback("source", &source)); |
| NotifyCanceled(); |
| + NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, result)); |
| } |
| } |