| 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 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 // Hang on to a reference to ensure the blob is not released prior | 1528 // Hang on to a reference to ensure the blob is not released prior |
| 1529 // to the job being started. | 1529 // to the job being started. |
| 1530 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( | 1530 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( |
| 1531 new_request.get(), | 1531 new_request.get(), |
| 1532 filter_->blob_storage_context()->context()->GetBlobDataFromPublicURL( | 1532 filter_->blob_storage_context()->context()->GetBlobDataFromPublicURL( |
| 1533 new_request->url())); | 1533 new_request->url())); |
| 1534 } | 1534 } |
| 1535 | 1535 |
| 1536 // Initialize the service worker handler for the request. We don't use | 1536 // Initialize the service worker handler for the request. We don't use |
| 1537 // ServiceWorker for synchronous loads to avoid renderer deadlocks. | 1537 // ServiceWorker for synchronous loads to avoid renderer deadlocks. |
| 1538 const bool should_skip_service_worker = | 1538 const SkipServiceWorker should_skip_service_worker = |
| 1539 request_data.skip_service_worker || is_sync_load; | 1539 is_sync_load ? SkipServiceWorker::ALL : request_data.skip_service_worker; |
| 1540 ServiceWorkerRequestHandler::InitializeHandler( | 1540 ServiceWorkerRequestHandler::InitializeHandler( |
| 1541 new_request.get(), filter_->service_worker_context(), blob_context, | 1541 new_request.get(), filter_->service_worker_context(), blob_context, |
| 1542 child_id, request_data.service_worker_provider_id, | 1542 child_id, request_data.service_worker_provider_id, |
| 1543 should_skip_service_worker, | 1543 should_skip_service_worker != SkipServiceWorker::NONE, |
| 1544 request_data.fetch_request_mode, request_data.fetch_credentials_mode, | 1544 request_data.fetch_request_mode, request_data.fetch_credentials_mode, |
| 1545 request_data.fetch_redirect_mode, request_data.resource_type, | 1545 request_data.fetch_redirect_mode, request_data.resource_type, |
| 1546 request_data.fetch_request_context_type, request_data.fetch_frame_type, | 1546 request_data.fetch_request_context_type, request_data.fetch_frame_type, |
| 1547 request_data.request_body); | 1547 request_data.request_body); |
| 1548 | 1548 |
| 1549 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1549 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1550 switches::kEnableExperimentalWebPlatformFeatures)) { | 1550 switches::kEnableExperimentalWebPlatformFeatures)) { |
| 1551 ForeignFetchRequestHandler::InitializeHandler( | 1551 ForeignFetchRequestHandler::InitializeHandler( |
| 1552 new_request.get(), filter_->service_worker_context(), blob_context, | 1552 new_request.get(), filter_->service_worker_context(), blob_context, |
| 1553 child_id, request_data.service_worker_provider_id, | 1553 child_id, request_data.service_worker_provider_id, |
| 1554 should_skip_service_worker, | 1554 should_skip_service_worker, request_data.fetch_request_mode, |
| 1555 request_data.fetch_request_mode, request_data.fetch_credentials_mode, | 1555 request_data.fetch_credentials_mode, request_data.fetch_redirect_mode, |
| 1556 request_data.fetch_redirect_mode, request_data.resource_type, | 1556 request_data.resource_type, request_data.fetch_request_context_type, |
| 1557 request_data.fetch_request_context_type, request_data.fetch_frame_type, | 1557 request_data.fetch_frame_type, request_data.request_body, |
| 1558 request_data.request_body, request_data.initiated_in_secure_context); | 1558 request_data.initiated_in_secure_context); |
| 1559 } | 1559 } |
| 1560 | 1560 |
| 1561 // Have the appcache associate its extra info with the request. | 1561 // Have the appcache associate its extra info with the request. |
| 1562 AppCacheInterceptor::SetExtraRequestInfo( | 1562 AppCacheInterceptor::SetExtraRequestInfo( |
| 1563 new_request.get(), filter_->appcache_service(), child_id, | 1563 new_request.get(), filter_->appcache_service(), child_id, |
| 1564 request_data.appcache_host_id, request_data.resource_type, | 1564 request_data.appcache_host_id, request_data.resource_type, |
| 1565 request_data.should_reset_appcache); | 1565 request_data.should_reset_appcache); |
| 1566 | 1566 |
| 1567 std::unique_ptr<ResourceHandler> handler(CreateResourceHandler( | 1567 std::unique_ptr<ResourceHandler> handler(CreateResourceHandler( |
| 1568 new_request.get(), request_data, sync_result, route_id, process_type, | 1568 new_request.get(), request_data, sync_result, route_id, process_type, |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2600 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); | 2600 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); |
| 2601 response->head.security_info = SerializeSecurityInfo(ssl); | 2601 response->head.security_info = SerializeSecurityInfo(ssl); |
| 2602 } | 2602 } |
| 2603 | 2603 |
| 2604 CertStore* ResourceDispatcherHostImpl::GetCertStore() { | 2604 CertStore* ResourceDispatcherHostImpl::GetCertStore() { |
| 2605 return cert_store_for_testing_ ? cert_store_for_testing_ | 2605 return cert_store_for_testing_ ? cert_store_for_testing_ |
| 2606 : CertStore::GetInstance(); | 2606 : CertStore::GetInstance(); |
| 2607 } | 2607 } |
| 2608 | 2608 |
| 2609 } // namespace content | 2609 } // namespace content |
| OLD | NEW |