OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/browser/service_worker/service_worker_request_handler.h" | 5 #include "content/browser/service_worker/service_worker_request_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 if (!navigation_handle_core->context_wrapper() || | 117 if (!navigation_handle_core->context_wrapper() || |
118 !navigation_handle_core->context_wrapper()->context()) { | 118 !navigation_handle_core->context_wrapper()->context()) { |
119 return; | 119 return; |
120 } | 120 } |
121 | 121 |
122 // Initialize the SWProviderHost. | 122 // Initialize the SWProviderHost. |
123 std::unique_ptr<ServiceWorkerProviderHost> provider_host = | 123 std::unique_ptr<ServiceWorkerProviderHost> provider_host = |
124 ServiceWorkerProviderHost::PreCreateNavigationHost( | 124 ServiceWorkerProviderHost::PreCreateNavigationHost( |
125 navigation_handle_core->context_wrapper()->context()->AsWeakPtr(), | 125 navigation_handle_core->context_wrapper()->context()->AsWeakPtr(), |
| 126 navigation_handle_core->url_loader_factory_getter(), |
126 is_parent_frame_secure); | 127 is_parent_frame_secure); |
127 | 128 |
128 FinalizeHandlerInitialization( | 129 FinalizeHandlerInitialization( |
129 request, provider_host.get(), blob_storage_context, skip_service_worker, | 130 request, provider_host.get(), blob_storage_context, skip_service_worker, |
130 FETCH_REQUEST_MODE_NAVIGATE, FETCH_CREDENTIALS_MODE_INCLUDE, | 131 FETCH_REQUEST_MODE_NAVIGATE, FETCH_CREDENTIALS_MODE_INCLUDE, |
131 FetchRedirectMode::MANUAL_MODE, resource_type, request_context_type, | 132 FetchRedirectMode::MANUAL_MODE, resource_type, request_context_type, |
132 frame_type, body); | 133 frame_type, body); |
133 | 134 |
134 // Transfer ownership to the ServiceWorkerNavigationHandleCore. | 135 // Transfer ownership to the ServiceWorkerNavigationHandleCore. |
135 // In the case of a successful navigation, the SWProviderHost will be | 136 // In the case of a successful navigation, the SWProviderHost will be |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 ResourceType resource_type) | 255 ResourceType resource_type) |
255 : context_(context), | 256 : context_(context), |
256 provider_host_(provider_host), | 257 provider_host_(provider_host), |
257 blob_storage_context_(blob_storage_context), | 258 blob_storage_context_(blob_storage_context), |
258 resource_type_(resource_type), | 259 resource_type_(resource_type), |
259 old_process_id_(0), | 260 old_process_id_(0), |
260 old_provider_id_(kInvalidServiceWorkerProviderId) { | 261 old_provider_id_(kInvalidServiceWorkerProviderId) { |
261 } | 262 } |
262 | 263 |
263 } // namespace content | 264 } // namespace content |
OLD | NEW |