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