Chromium Code Reviews| 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 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1725 // Insert a buffered event handler before the actual one. | 1725 // Insert a buffered event handler before the actual one. |
| 1726 handler.reset(new MimeTypeResourceHandler(std::move(handler), this, | 1726 handler.reset(new MimeTypeResourceHandler(std::move(handler), this, |
| 1727 plugin_service, request)); | 1727 plugin_service, request)); |
| 1728 | 1728 |
| 1729 ScopedVector<ResourceThrottle> throttles; | 1729 ScopedVector<ResourceThrottle> throttles; |
| 1730 | 1730 |
| 1731 // Add a NavigationResourceThrottle for navigations. | 1731 // Add a NavigationResourceThrottle for navigations. |
| 1732 // PlzNavigate: the throttle is unnecessary as communication with the UI | 1732 // PlzNavigate: the throttle is unnecessary as communication with the UI |
| 1733 // thread is handled by the NavigationURLloader. | 1733 // thread is handled by the NavigationURLloader. |
| 1734 if (!IsBrowserSideNavigationEnabled() && IsResourceTypeFrame(resource_type)) | 1734 if (!IsBrowserSideNavigationEnabled() && IsResourceTypeFrame(resource_type)) |
| 1735 throttles.push_back(new NavigationResourceThrottle(request)); | 1735 throttles.push_back(new NavigationResourceThrottle(request, this)); |
| 1736 | 1736 |
| 1737 if (delegate_) { | 1737 if (delegate_) { |
| 1738 delegate_->RequestBeginning(request, | 1738 delegate_->RequestBeginning(request, |
| 1739 resource_context, | 1739 resource_context, |
| 1740 appcache_service, | 1740 appcache_service, |
| 1741 resource_type, | 1741 resource_type, |
| 1742 &throttles); | 1742 &throttles); |
| 1743 } | 1743 } |
| 1744 | 1744 |
| 1745 if (request->has_upload()) { | 1745 if (request->has_upload()) { |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2322 info.is_main_frame ? REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL | 2322 info.is_main_frame ? REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL |
| 2323 : REQUEST_CONTEXT_FRAME_TYPE_NESTED; | 2323 : REQUEST_CONTEXT_FRAME_TYPE_NESTED; |
| 2324 ServiceWorkerRequestHandler::InitializeForNavigation( | 2324 ServiceWorkerRequestHandler::InitializeForNavigation( |
| 2325 new_request.get(), service_worker_handle_core, blob_context, | 2325 new_request.get(), service_worker_handle_core, blob_context, |
| 2326 info.begin_params.skip_service_worker, resource_type, | 2326 info.begin_params.skip_service_worker, resource_type, |
| 2327 info.begin_params.request_context_type, frame_type, info.request_body); | 2327 info.begin_params.request_context_type, frame_type, info.request_body); |
| 2328 | 2328 |
| 2329 // TODO(davidben): Attach AppCacheInterceptor. | 2329 // TODO(davidben): Attach AppCacheInterceptor. |
| 2330 | 2330 |
| 2331 std::unique_ptr<ResourceHandler> handler( | 2331 std::unique_ptr<ResourceHandler> handler( |
| 2332 new NavigationResourceHandler(new_request.get(), loader)); | 2332 new NavigationResourceHandler(new_request.get(), loader, this)); |
|
bengr
2016/04/29 21:14:23
I find it a little weird that NRH takes an Impl ob
RyanSturm
2016/05/02 19:52:22
I suppose this could take an rdhd instead, but I p
| |
| 2333 | 2333 |
| 2334 // TODO(davidben): Pass in the appropriate appcache_service. Also fix the | 2334 // TODO(davidben): Pass in the appropriate appcache_service. Also fix the |
| 2335 // dependency on child_id/route_id. Those are used by the ResourceScheduler; | 2335 // dependency on child_id/route_id. Those are used by the ResourceScheduler; |
| 2336 // currently it's a no-op. | 2336 // currently it's a no-op. |
| 2337 handler = | 2337 handler = |
| 2338 AddStandardHandlers(new_request.get(), resource_type, resource_context, | 2338 AddStandardHandlers(new_request.get(), resource_type, resource_context, |
| 2339 nullptr, // appcache_service | 2339 nullptr, // appcache_service |
| 2340 -1, // child_id | 2340 -1, // child_id |
| 2341 -1, // route_id | 2341 -1, // route_id |
| 2342 std::move(handler)); | 2342 std::move(handler)); |
| (...skipping 345 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 |