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 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1433 // Initialize the service worker handler for the request. We don't use | 1433 // Initialize the service worker handler for the request. We don't use |
1434 // ServiceWorker for synchronous loads to avoid renderer deadlocks. | 1434 // ServiceWorker for synchronous loads to avoid renderer deadlocks. |
1435 const ServiceWorkerMode service_worker_mode = | 1435 const ServiceWorkerMode service_worker_mode = |
1436 is_sync_load ? ServiceWorkerMode::NONE | 1436 is_sync_load ? ServiceWorkerMode::NONE |
1437 : request_data.service_worker_mode; | 1437 : request_data.service_worker_mode; |
1438 ServiceWorkerRequestHandler::InitializeHandler( | 1438 ServiceWorkerRequestHandler::InitializeHandler( |
1439 new_request.get(), requester_info->service_worker_context(), | 1439 new_request.get(), requester_info->service_worker_context(), |
1440 blob_context, child_id, request_data.service_worker_provider_id, | 1440 blob_context, child_id, request_data.service_worker_provider_id, |
1441 service_worker_mode != ServiceWorkerMode::ALL, | 1441 service_worker_mode != ServiceWorkerMode::ALL, |
1442 request_data.fetch_request_mode, request_data.fetch_credentials_mode, | 1442 request_data.fetch_request_mode, request_data.fetch_credentials_mode, |
1443 request_data.fetch_redirect_mode, request_data.resource_type, | 1443 request_data.fetch_redirect_mode, request_data.fetch_integrity, |
1444 request_data.fetch_request_context_type, request_data.fetch_frame_type, | 1444 request_data.resource_type, request_data.fetch_request_context_type, |
1445 request_data.request_body); | 1445 request_data.fetch_frame_type, request_data.request_body); |
1446 | 1446 |
1447 ForeignFetchRequestHandler::InitializeHandler( | 1447 ForeignFetchRequestHandler::InitializeHandler( |
1448 new_request.get(), requester_info->service_worker_context(), | 1448 new_request.get(), requester_info->service_worker_context(), |
1449 blob_context, child_id, request_data.service_worker_provider_id, | 1449 blob_context, child_id, request_data.service_worker_provider_id, |
1450 service_worker_mode, request_data.fetch_request_mode, | 1450 service_worker_mode, request_data.fetch_request_mode, |
1451 request_data.fetch_credentials_mode, request_data.fetch_redirect_mode, | 1451 request_data.fetch_credentials_mode, request_data.fetch_redirect_mode, |
1452 request_data.resource_type, request_data.fetch_request_context_type, | 1452 request_data.fetch_integrity, request_data.resource_type, |
1453 request_data.fetch_frame_type, request_data.request_body, | 1453 request_data.fetch_request_context_type, request_data.fetch_frame_type, |
1454 request_data.initiated_in_secure_context); | 1454 request_data.request_body, request_data.initiated_in_secure_context); |
1455 | 1455 |
1456 // Have the appcache associate its extra info with the request. | 1456 // Have the appcache associate its extra info with the request. |
1457 AppCacheInterceptor::SetExtraRequestInfo( | 1457 AppCacheInterceptor::SetExtraRequestInfo( |
1458 new_request.get(), requester_info->appcache_service(), child_id, | 1458 new_request.get(), requester_info->appcache_service(), child_id, |
1459 request_data.appcache_host_id, request_data.resource_type, | 1459 request_data.appcache_host_id, request_data.resource_type, |
1460 request_data.should_reset_appcache); | 1460 request_data.should_reset_appcache); |
1461 handler = CreateResourceHandler( | 1461 handler = CreateResourceHandler( |
1462 requester_info.get(), new_request.get(), request_data, | 1462 requester_info.get(), new_request.get(), request_data, |
1463 sync_result_handler, route_id, child_id, resource_context, | 1463 sync_result_handler, route_id, child_id, resource_context, |
1464 std::move(mojo_request), std::move(url_loader_client)); | 1464 std::move(mojo_request), std::move(url_loader_client)); |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2781 if (iter->second > 2) { | 2781 if (iter->second > 2) { |
2782 active_tabs++; | 2782 active_tabs++; |
2783 if (active_tabs >= 2) | 2783 if (active_tabs >= 2) |
2784 return true; | 2784 return true; |
2785 } | 2785 } |
2786 } | 2786 } |
2787 return false; | 2787 return false; |
2788 } | 2788 } |
2789 | 2789 |
2790 } // namespace content | 2790 } // namespace content |
OLD | NEW |