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 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 // Initialize the service worker handler for the request. We don't use | 1454 // Initialize the service worker handler for the request. We don't use |
1455 // ServiceWorker for synchronous loads to avoid renderer deadlocks. | 1455 // ServiceWorker for synchronous loads to avoid renderer deadlocks. |
1456 const ServiceWorkerMode service_worker_mode = | 1456 const ServiceWorkerMode service_worker_mode = |
1457 is_sync_load ? ServiceWorkerMode::NONE | 1457 is_sync_load ? ServiceWorkerMode::NONE |
1458 : request_data.service_worker_mode; | 1458 : request_data.service_worker_mode; |
1459 ServiceWorkerRequestHandler::InitializeHandler( | 1459 ServiceWorkerRequestHandler::InitializeHandler( |
1460 new_request.get(), requester_info->service_worker_context(), | 1460 new_request.get(), requester_info->service_worker_context(), |
1461 blob_context, child_id, request_data.service_worker_provider_id, | 1461 blob_context, child_id, request_data.service_worker_provider_id, |
1462 service_worker_mode != ServiceWorkerMode::ALL, | 1462 service_worker_mode != ServiceWorkerMode::ALL, |
1463 request_data.fetch_request_mode, request_data.fetch_credentials_mode, | 1463 request_data.fetch_request_mode, request_data.fetch_credentials_mode, |
1464 request_data.fetch_redirect_mode, request_data.resource_type, | 1464 request_data.fetch_redirect_mode, request_data.fetch_integrity, |
1465 request_data.fetch_request_context_type, request_data.fetch_frame_type, | 1465 request_data.resource_type, request_data.fetch_request_context_type, |
1466 request_data.request_body); | 1466 request_data.fetch_frame_type, request_data.request_body); |
1467 | 1467 |
1468 ForeignFetchRequestHandler::InitializeHandler( | 1468 ForeignFetchRequestHandler::InitializeHandler( |
1469 new_request.get(), requester_info->service_worker_context(), | 1469 new_request.get(), requester_info->service_worker_context(), |
1470 blob_context, child_id, request_data.service_worker_provider_id, | 1470 blob_context, child_id, request_data.service_worker_provider_id, |
1471 service_worker_mode, request_data.fetch_request_mode, | 1471 service_worker_mode, request_data.fetch_request_mode, |
1472 request_data.fetch_credentials_mode, request_data.fetch_redirect_mode, | 1472 request_data.fetch_credentials_mode, request_data.fetch_redirect_mode, |
1473 request_data.resource_type, request_data.fetch_request_context_type, | 1473 request_data.fetch_integrity, request_data.resource_type, |
1474 request_data.fetch_frame_type, request_data.request_body, | 1474 request_data.fetch_request_context_type, request_data.fetch_frame_type, |
1475 request_data.initiated_in_secure_context); | 1475 request_data.request_body, request_data.initiated_in_secure_context); |
1476 | 1476 |
1477 // Have the appcache associate its extra info with the request. | 1477 // Have the appcache associate its extra info with the request. |
1478 AppCacheInterceptor::SetExtraRequestInfo( | 1478 AppCacheInterceptor::SetExtraRequestInfo( |
1479 new_request.get(), requester_info->appcache_service(), child_id, | 1479 new_request.get(), requester_info->appcache_service(), child_id, |
1480 request_data.appcache_host_id, request_data.resource_type, | 1480 request_data.appcache_host_id, request_data.resource_type, |
1481 request_data.should_reset_appcache); | 1481 request_data.should_reset_appcache); |
1482 handler = CreateResourceHandler( | 1482 handler = CreateResourceHandler( |
1483 requester_info.get(), new_request.get(), request_data, | 1483 requester_info.get(), new_request.get(), request_data, |
1484 sync_result_handler, route_id, child_id, resource_context, | 1484 sync_result_handler, route_id, child_id, resource_context, |
1485 std::move(mojo_request), std::move(url_loader_client)); | 1485 std::move(mojo_request), std::move(url_loader_client)); |
(...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2803 if (iter->second > 2) { | 2803 if (iter->second > 2) { |
2804 active_tabs++; | 2804 active_tabs++; |
2805 if (active_tabs >= 2) | 2805 if (active_tabs >= 2) |
2806 return true; | 2806 return true; |
2807 } | 2807 } |
2808 } | 2808 } |
2809 return false; | 2809 return false; |
2810 } | 2810 } |
2811 | 2811 |
2812 } // namespace content | 2812 } // namespace content |
OLD | NEW |