| 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_controllee_request_handl
er.h" | 5 #include "content/browser/service_worker/service_worker_controllee_request_handl
er.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // never be handled by a service worker. This is not true of main frame | 115 // never be handled by a service worker. This is not true of main frame |
| 116 // requests. | 116 // requests. |
| 117 if (is_main_resource_load_) | 117 if (is_main_resource_load_) |
| 118 use_network_ = false; | 118 use_network_ = false; |
| 119 return NULL; | 119 return NULL; |
| 120 } | 120 } |
| 121 | 121 |
| 122 // It's for original request (A) or redirect case (B-a or B-b). | 122 // It's for original request (A) or redirect case (B-a or B-b). |
| 123 std::unique_ptr<ServiceWorkerURLRequestJob> job( | 123 std::unique_ptr<ServiceWorkerURLRequestJob> job( |
| 124 new ServiceWorkerURLRequestJob( | 124 new ServiceWorkerURLRequestJob( |
| 125 request, network_delegate, provider_host_->client_uuid(), | 125 request, network_delegate, provider_host_, blob_storage_context_, |
| 126 blob_storage_context_, resource_context, request_mode_, | 126 resource_context, request_mode_, credentials_mode_, redirect_mode_, |
| 127 credentials_mode_, redirect_mode_, resource_type_, | 127 resource_type_, request_context_type_, frame_type_, body_, |
| 128 request_context_type_, frame_type_, body_, | |
| 129 ServiceWorkerFetchType::FETCH, this)); | 128 ServiceWorkerFetchType::FETCH, this)); |
| 130 job_ = job->GetWeakPtr(); | 129 job_ = job->GetWeakPtr(); |
| 131 | 130 |
| 132 resource_context_ = resource_context; | 131 resource_context_ = resource_context; |
| 133 | 132 |
| 134 if (is_main_resource_load_) | 133 if (is_main_resource_load_) |
| 135 PrepareForMainResource(request); | 134 PrepareForMainResource(request); |
| 136 else | 135 else |
| 137 PrepareForSubResource(); | 136 PrepareForSubResource(); |
| 138 | 137 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 DCHECK(provider_host_); | 430 DCHECK(provider_host_); |
| 432 // Detach the controller so subresource requests also skip the worker. | 431 // Detach the controller so subresource requests also skip the worker. |
| 433 provider_host_->NotifyControllerLost(); | 432 provider_host_->NotifyControllerLost(); |
| 434 } | 433 } |
| 435 | 434 |
| 436 void ServiceWorkerControlleeRequestHandler::ClearJob() { | 435 void ServiceWorkerControlleeRequestHandler::ClearJob() { |
| 437 job_.reset(); | 436 job_.reset(); |
| 438 } | 437 } |
| 439 | 438 |
| 440 } // namespace content | 439 } // namespace content |
| OLD | NEW |