| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
| 6 | 6 |
| 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 // Check if the renderer is permitted to request the requested URL. | 774 // Check if the renderer is permitted to request the requested URL. |
| 775 if (!ChildProcessSecurityPolicyImpl::GetInstance()-> | 775 if (!ChildProcessSecurityPolicyImpl::GetInstance()-> |
| 776 CanRequestURL(child_id, url)) { | 776 CanRequestURL(child_id, url)) { |
| 777 DVLOG(1) << "Denied unauthorized download request for " | 777 DVLOG(1) << "Denied unauthorized download request for " |
| 778 << url.possibly_invalid_spec(); | 778 << url.possibly_invalid_spec(); |
| 779 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; | 779 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; |
| 780 } | 780 } |
| 781 | 781 |
| 782 request_id_--; | 782 request_id_--; |
| 783 | 783 |
| 784 const net::URLRequestContext* request_context = context->GetRequestContext(); | 784 const net::URLRequestContext* request_context = request->context(); |
| 785 if (!request_context->job_factory()->IsHandledURL(url)) { | 785 if (!request_context->job_factory()->IsHandledURL(url)) { |
| 786 DVLOG(1) << "Download request for unsupported protocol: " | 786 DVLOG(1) << "Download request for unsupported protocol: " |
| 787 << url.possibly_invalid_spec(); | 787 << url.possibly_invalid_spec(); |
| 788 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; | 788 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; |
| 789 } | 789 } |
| 790 | 790 |
| 791 ResourceRequestInfoImpl* extra_info = | 791 ResourceRequestInfoImpl* extra_info = |
| 792 CreateRequestInfo(child_id, render_view_route_id, | 792 CreateRequestInfo(child_id, render_view_route_id, |
| 793 render_frame_route_id, true, context); | 793 render_frame_route_id, true, context); |
| 794 extra_info->set_do_not_prompt_for_login(do_not_prompt_for_login); | 794 extra_info->set_do_not_prompt_for_login(do_not_prompt_for_login); |
| (...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2688 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); | 2688 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); |
| 2689 response->head.security_info = SerializeSecurityInfo(ssl); | 2689 response->head.security_info = SerializeSecurityInfo(ssl); |
| 2690 } | 2690 } |
| 2691 | 2691 |
| 2692 CertStore* ResourceDispatcherHostImpl::GetCertStore() { | 2692 CertStore* ResourceDispatcherHostImpl::GetCertStore() { |
| 2693 return cert_store_for_testing_ ? cert_store_for_testing_ | 2693 return cert_store_for_testing_ ? cert_store_for_testing_ |
| 2694 : CertStore::GetInstance(); | 2694 : CertStore::GetInstance(); |
| 2695 } | 2695 } |
| 2696 | 2696 |
| 2697 } // namespace content | 2697 } // namespace content |
| OLD | NEW |