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 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1559 // Hang on to a reference to ensure the blob is not released prior | 1559 // Hang on to a reference to ensure the blob is not released prior |
1560 // to the job being started. | 1560 // to the job being started. |
1561 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( | 1561 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( |
1562 new_request.get(), | 1562 new_request.get(), |
1563 filter_->blob_storage_context()->context()->GetBlobDataFromPublicURL( | 1563 filter_->blob_storage_context()->context()->GetBlobDataFromPublicURL( |
1564 new_request->url())); | 1564 new_request->url())); |
1565 } | 1565 } |
1566 | 1566 |
1567 // Initialize the service worker handler for the request. We don't use | 1567 // Initialize the service worker handler for the request. We don't use |
1568 // ServiceWorker for synchronous loads to avoid renderer deadlocks. | 1568 // ServiceWorker for synchronous loads to avoid renderer deadlocks. |
1569 const bool should_skip_service_worker = | 1569 const SkipServiceWorker should_skip_service_worker = |
1570 request_data.skip_service_worker || is_sync_load; | 1570 is_sync_load ? SkipServiceWorker::ALL : request_data.skip_service_worker; |
1571 ServiceWorkerRequestHandler::InitializeHandler( | 1571 ServiceWorkerRequestHandler::InitializeHandler( |
1572 new_request.get(), filter_->service_worker_context(), blob_context, | 1572 new_request.get(), filter_->service_worker_context(), blob_context, |
1573 child_id, request_data.service_worker_provider_id, | 1573 child_id, request_data.service_worker_provider_id, |
1574 should_skip_service_worker, | 1574 should_skip_service_worker != SkipServiceWorker::NONE, |
1575 request_data.fetch_request_mode, request_data.fetch_credentials_mode, | 1575 request_data.fetch_request_mode, request_data.fetch_credentials_mode, |
1576 request_data.fetch_redirect_mode, request_data.resource_type, | 1576 request_data.fetch_redirect_mode, request_data.resource_type, |
1577 request_data.fetch_request_context_type, request_data.fetch_frame_type, | 1577 request_data.fetch_request_context_type, request_data.fetch_frame_type, |
1578 request_data.request_body); | 1578 request_data.request_body); |
1579 | 1579 |
1580 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1580 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
1581 switches::kEnableExperimentalWebPlatformFeatures)) { | 1581 switches::kEnableExperimentalWebPlatformFeatures)) { |
1582 ForeignFetchRequestHandler::InitializeHandler( | 1582 ForeignFetchRequestHandler::InitializeHandler( |
1583 new_request.get(), filter_->service_worker_context(), blob_context, | 1583 new_request.get(), filter_->service_worker_context(), blob_context, |
1584 child_id, request_data.service_worker_provider_id, | 1584 child_id, request_data.service_worker_provider_id, |
1585 should_skip_service_worker, | 1585 should_skip_service_worker, request_data.fetch_request_mode, |
1586 request_data.fetch_request_mode, request_data.fetch_credentials_mode, | 1586 request_data.fetch_credentials_mode, request_data.fetch_redirect_mode, |
1587 request_data.fetch_redirect_mode, request_data.resource_type, | 1587 request_data.resource_type, request_data.fetch_request_context_type, |
1588 request_data.fetch_request_context_type, request_data.fetch_frame_type, | 1588 request_data.fetch_frame_type, request_data.request_body, |
1589 request_data.request_body, request_data.initiated_in_secure_context); | 1589 request_data.initiated_in_secure_context); |
1590 } | 1590 } |
1591 | 1591 |
1592 // Have the appcache associate its extra info with the request. | 1592 // Have the appcache associate its extra info with the request. |
1593 AppCacheInterceptor::SetExtraRequestInfo( | 1593 AppCacheInterceptor::SetExtraRequestInfo( |
1594 new_request.get(), filter_->appcache_service(), child_id, | 1594 new_request.get(), filter_->appcache_service(), child_id, |
1595 request_data.appcache_host_id, request_data.resource_type, | 1595 request_data.appcache_host_id, request_data.resource_type, |
1596 request_data.should_reset_appcache); | 1596 request_data.should_reset_appcache); |
1597 | 1597 |
1598 std::unique_ptr<ResourceHandler> handler(CreateResourceHandler( | 1598 std::unique_ptr<ResourceHandler> handler(CreateResourceHandler( |
1599 new_request.get(), request_data, sync_result, route_id, process_type, | 1599 new_request.get(), request_data, sync_result, route_id, process_type, |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2655 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); | 2655 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); |
2656 response->head.security_info = SerializeSecurityInfo(ssl); | 2656 response->head.security_info = SerializeSecurityInfo(ssl); |
2657 } | 2657 } |
2658 | 2658 |
2659 CertStore* ResourceDispatcherHostImpl::GetCertStore() { | 2659 CertStore* ResourceDispatcherHostImpl::GetCertStore() { |
2660 return cert_store_for_testing_ ? cert_store_for_testing_ | 2660 return cert_store_for_testing_ ? cert_store_for_testing_ |
2661 : CertStore::GetInstance(); | 2661 : CertStore::GetInstance(); |
2662 } | 2662 } |
2663 | 2663 |
2664 } // namespace content | 2664 } // namespace content |
OLD | NEW |