Chromium Code Reviews| Index: content/browser/renderer_host/resource_dispatcher_host_impl.cc |
| diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.cc b/content/browser/renderer_host/resource_dispatcher_host_impl.cc |
| index a44e4433ca9784a53ae673dfc21f0ddd884cf3a1..5ee1129d6c16a6d2ac119e0bed1dd89f2e4de4c9 100644 |
| --- a/content/browser/renderer_host/resource_dispatcher_host_impl.cc |
| +++ b/content/browser/renderer_host/resource_dispatcher_host_impl.cc |
| @@ -494,7 +494,6 @@ net::Error ResourceDispatcherHostImpl::BeginDownload( |
| const net::URLRequestContext* request_context = context->GetRequestContext(); |
|
erikwright (departed)
2012/06/19 21:06:22
this is now used exclusively on line 529, so do it
shalev
2012/06/20 20:13:12
Done.
|
| request->set_referrer(MaybeStripReferrer(GURL(request->referrer())).spec()); |
| - request->set_context(request_context); |
| int extra_load_flags = net::LOAD_IS_DOWNLOAD; |
| if (prefer_cache) { |
| // If there is upload data attached, only retrieve from cache because there |
| @@ -803,7 +802,10 @@ void ResourceDispatcherHostImpl::BeginRequest( |
| if (deferred_request) { |
| request = deferred_request; |
| } else { |
| - request = new net::URLRequest(request_data.url, this); |
| + request = new net::URLRequest( |
| + request_data.url, |
| + this, |
| + filter_->GetURLRequestContext(request_data.resource_type)); |
| request->set_method(request_data.method); |
| request->set_first_party_for_cookies(request_data.first_party_for_cookies); |
| request->set_referrer(referrer.url.spec()); |
| @@ -850,8 +852,6 @@ void ResourceDispatcherHostImpl::BeginRequest( |
| request->set_load_flags(load_flags); |
| - request->set_context( |
| - filter_->GetURLRequestContext(request_data.resource_type)); |
| request->set_priority(DetermineRequestPriority(request_data.resource_type)); |
| // Set upload data. |
| @@ -1173,14 +1173,15 @@ void ResourceDispatcherHostImpl::BeginSaveFile( |
| return; |
| } |
| - net::URLRequest* request = new net::URLRequest(url, this); |
| + net::URLRequest* request = new net::URLRequest(url, |
| + this, |
| + context->GetRequestContext()); |
|
erikwright (departed)
2012/06/19 21:06:22
access this via request_context local variable.
shalev
2012/06/20 20:13:12
Done.
|
| request->set_method("GET"); |
| request->set_referrer(MaybeStripReferrer(referrer.url).spec()); |
| webkit_glue::ConfigureURLRequestForReferrerPolicy(request, referrer.policy); |
| // So far, for saving page, we need fetch content from cache, in the |
| // future, maybe we can use a configuration to configure this behavior. |
| request->set_load_flags(net::LOAD_PREFERRING_CACHE); |
| - request->set_context(context->GetRequestContext()); |
| // Since we're just saving some resources we need, disallow downloading. |
| ResourceRequestInfoImpl* extra_info = |