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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 10911151: URLRequestHttpJob::StartTransaction should honour network delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing accidentally commited code change Created 8 years, 3 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 | « net/url_request/url_request_http_job.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
}
« no previous file with comments | « net/url_request/url_request_http_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698