diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-21 16:32:19 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-21 16:34:06 +0000 |
commit | f7022f35ef5ae2ce0aa7fbb5977b140ca1a2ab1c (patch) | |
tree | a7890ddc698cb75c4f86babfe3c4d34e23c67f29 /net/url_request/url_request_http_job.cc | |
parent | 4b04e3424d3a266d33d5f613cbfbbecd1bd5388a (diff) | |
download | chromium_src-f7022f35ef5ae2ce0aa7fbb5977b140ca1a2ab1c.zip chromium_src-f7022f35ef5ae2ce0aa7fbb5977b140ca1a2ab1c.tar.gz chromium_src-f7022f35ef5ae2ce0aa7fbb5977b140ca1a2ab1c.tar.bz2 |
Allow URLRequests from one context to have different NetworkDelegates.
This is a prerequisite to allowing a URLRequestJob to transparently wrap
a URLRequest, so AppCache can override the response for failing and
redirected requests without the NetworkDelegate or URLRequest::Delegate
being aware of the underlying request.
Also consolidate the URLRequest constructors, and make most code create
URLRequests through the URLRequestContext's CreateRequest function,
rather than through its constructor.
TBR=battre@chromium.org
BUG=161547
Review URL: https://codereview.chromium.org/407093011
Cr-Commit-Position: refs/heads/master@{#291090}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_http_job.cc')
-rw-r--r-- | net/url_request/url_request_http_job.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc index 38950c2..a870a2c 100644 --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc @@ -446,8 +446,9 @@ void URLRequestHttpJob::StartTransactionInternal() { base::Bind(&URLRequestHttpJob::NotifyBeforeSendProxyHeadersCallback, base::Unretained(this))); - if (!throttling_entry_.get() || - !throttling_entry_->ShouldRejectRequest(*request_)) { + if (!throttling_entry_ || + !throttling_entry_->ShouldRejectRequest( + *request_, network_delegate())) { rv = transaction_->Start( &request_info_, start_callback_, request_->net_log()); start_time_ = base::TimeTicks::Now(); |