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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_->client_uuid(), |
126 blob_storage_context_, resource_context, request_mode_, | 126 blob_storage_context_, resource_context, request_mode_, |
127 credentials_mode_, redirect_mode_, resource_type_, | 127 credentials_mode_, redirect_mode_, resource_type_, |
128 request_context_type_, frame_type_, body_, | 128 request_context_type_, frame_type_, body_, |
129 ServiceWorkerFetchType::FETCH, this)); | 129 ServiceWorkerFetchType::FETCH, base::nullopt, this)); |
130 job_ = job->GetWeakPtr(); | 130 job_ = job->GetWeakPtr(); |
131 | 131 |
132 resource_context_ = resource_context; | 132 resource_context_ = resource_context; |
133 | 133 |
134 if (is_main_resource_load_) | 134 if (is_main_resource_load_) |
135 PrepareForMainResource(request); | 135 PrepareForMainResource(request); |
136 else | 136 else |
137 PrepareForSubResource(); | 137 PrepareForSubResource(); |
138 | 138 |
139 if (job_->ShouldFallbackToNetwork()) { | 139 if (job_->ShouldFallbackToNetwork()) { |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 DCHECK(provider_host_); | 431 DCHECK(provider_host_); |
432 // Detach the controller so subresource requests also skip the worker. | 432 // Detach the controller so subresource requests also skip the worker. |
433 provider_host_->NotifyControllerLost(); | 433 provider_host_->NotifyControllerLost(); |
434 } | 434 } |
435 | 435 |
436 void ServiceWorkerControlleeRequestHandler::ClearJob() { | 436 void ServiceWorkerControlleeRequestHandler::ClearJob() { |
437 job_.reset(); | 437 job_.reset(); |
438 } | 438 } |
439 | 439 |
440 } // namespace content | 440 } // namespace content |
OLD | NEW |