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 c0e2dd1e14027ee06e4bdfaaf332b414a0283534..9f6312e768228eb5790f33c85f722b8638394b70 100644 |
--- a/net/url_request/url_request_http_job.cc |
+++ b/net/url_request/url_request_http_job.cc |
@@ -190,7 +190,8 @@ URLRequestHttpJob::URLRequestHttpJob( |
base::Bind(&URLRequestHttpJob::OnHeadersReceivedCallback, |
base::Unretained(this))), |
awaiting_callback_(false), |
- http_user_agent_settings_(http_user_agent_settings) { |
+ http_user_agent_settings_(http_user_agent_settings), |
+ request_(request) { |
URLRequestThrottlerManager* manager = request->context()->throttler_manager(); |
if (manager) |
throttling_entry_ = manager->RegisterRequestUrl(request->url()); |
@@ -414,6 +415,9 @@ void URLRequestHttpJob::StartTransactionInternal() { |
rv = request_->context()->http_transaction_factory()->CreateTransaction( |
priority_, &transaction_); |
+ transaction_->SetBeforeNetworkStartCallback( |
+ base::Bind(&URLRequestHttpJob::NotifyBeforeNetworkStart, this)); |
+ |
if (rv == OK && request_info_.url.SchemeIsWSOrWSS()) { |
// TODO(ricea): Implement WebSocket throttling semantics as defined in |
// RFC6455 Section 4.1. |
@@ -1167,6 +1171,11 @@ void URLRequestHttpJob::ContinueDespiteLastError() { |
weak_factory_.GetWeakPtr(), rv)); |
} |
+void URLRequestHttpJob::ResumeNetworkStart() { |
+ DCHECK(transaction_.get()); |
+ transaction_->ResumeNetworkStart(); |
+} |
+ |
bool URLRequestHttpJob::ShouldFixMismatchedContentLength(int rv) const { |
// Some servers send the body compressed, but specify the content length as |
// the uncompressed size. Although this violates the HTTP spec we want to |