| 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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 // Check if the renderer is permitted to request the requested URL. | 771 // Check if the renderer is permitted to request the requested URL. |
| 772 if (!ChildProcessSecurityPolicyImpl::GetInstance()-> | 772 if (!ChildProcessSecurityPolicyImpl::GetInstance()-> |
| 773 CanRequestURL(child_id, url)) { | 773 CanRequestURL(child_id, url)) { |
| 774 DVLOG(1) << "Denied unauthorized download request for " | 774 DVLOG(1) << "Denied unauthorized download request for " |
| 775 << url.possibly_invalid_spec(); | 775 << url.possibly_invalid_spec(); |
| 776 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; | 776 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; |
| 777 } | 777 } |
| 778 | 778 |
| 779 request_id_--; | 779 request_id_--; |
| 780 | 780 |
| 781 const net::URLRequestContext* request_context = context->GetRequestContext(); | 781 const net::URLRequestContext* request_context = request->context(); |
| 782 if (!request_context->job_factory()->IsHandledURL(url)) { | 782 if (!request_context->job_factory()->IsHandledURL(url)) { |
| 783 DVLOG(1) << "Download request for unsupported protocol: " | 783 DVLOG(1) << "Download request for unsupported protocol: " |
| 784 << url.possibly_invalid_spec(); | 784 << url.possibly_invalid_spec(); |
| 785 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; | 785 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; |
| 786 } | 786 } |
| 787 | 787 |
| 788 ResourceRequestInfoImpl* extra_info = | 788 ResourceRequestInfoImpl* extra_info = |
| 789 CreateRequestInfo(child_id, render_view_route_id, | 789 CreateRequestInfo(child_id, render_view_route_id, |
| 790 render_frame_route_id, true, context); | 790 render_frame_route_id, true, context); |
| 791 extra_info->set_do_not_prompt_for_login(do_not_prompt_for_login); | 791 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... |
| 2685 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); | 2685 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); |
| 2686 response->head.security_info = SerializeSecurityInfo(ssl); | 2686 response->head.security_info = SerializeSecurityInfo(ssl); |
| 2687 } | 2687 } |
| 2688 | 2688 |
| 2689 CertStore* ResourceDispatcherHostImpl::GetCertStore() { | 2689 CertStore* ResourceDispatcherHostImpl::GetCertStore() { |
| 2690 return cert_store_for_testing_ ? cert_store_for_testing_ | 2690 return cert_store_for_testing_ ? cert_store_for_testing_ |
| 2691 : CertStore::GetInstance(); | 2691 : CertStore::GetInstance(); |
| 2692 } | 2692 } |
| 2693 | 2693 |
| 2694 } // namespace content | 2694 } // namespace content |
| OLD | NEW |