| 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 "content/browser/service_worker/service_worker_context_core.h" | 7 #include "content/browser/service_worker/service_worker_context_core.h" |
| 8 #include "content/browser/service_worker/service_worker_metrics.h" | 8 #include "content/browser/service_worker/service_worker_metrics.h" |
| 9 #include "content/browser/service_worker/service_worker_provider_host.h" | 9 #include "content/browser/service_worker/service_worker_provider_host.h" |
| 10 #include "content/browser/service_worker/service_worker_registration.h" | 10 #include "content/browser/service_worker/service_worker_registration.h" |
| 11 #include "content/browser/service_worker/service_worker_url_request_job.h" | 11 #include "content/browser/service_worker/service_worker_url_request_job.h" |
| 12 #include "content/browser/service_worker/service_worker_utils.h" | 12 #include "content/browser/service_worker/service_worker_utils.h" |
| 13 #include "content/common/resource_request_body.h" | 13 #include "content/common/resource_request_body.h" |
| 14 #include "content/common/service_worker/service_worker_types.h" | 14 #include "content/common/service_worker/service_worker_types.h" |
| 15 #include "net/base/load_flags.h" | 15 #include "net/base/load_flags.h" |
| 16 #include "net/base/net_util.h" | 16 #include "net/base/net_util.h" |
| 17 #include "net/url_request/url_request.h" | 17 #include "net/url_request/url_request.h" |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 | 20 |
| 21 ServiceWorkerControlleeRequestHandler::ServiceWorkerControlleeRequestHandler( | 21 ServiceWorkerControlleeRequestHandler::ServiceWorkerControlleeRequestHandler( |
| 22 base::WeakPtr<ServiceWorkerContextCore> context, | 22 base::WeakPtr<ServiceWorkerContextCore> context, |
| 23 base::WeakPtr<ServiceWorkerProviderHost> provider_host, | 23 base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
| 24 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context, | 24 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
| 25 ResourceType resource_type, | 25 ResourceType resource_type, |
| 26 scoped_refptr<ResourceRequestBody> body) | 26 scoped_refptr<ResourceRequestBody> body) |
| 27 : ServiceWorkerRequestHandler(context, | 27 : ServiceWorkerRequestHandler(context, |
| 28 provider_host, | 28 provider_host, |
| 29 blob_storage_context, | 29 blob_storage_context, |
| 30 resource_type), | 30 resource_type), |
| 31 is_main_resource_load_( | 31 is_main_resource_load_( |
| 32 ServiceWorkerUtils::IsMainResourceType(resource_type)), | 32 ServiceWorkerUtils::IsMainResourceType(resource_type)), |
| 33 body_(body), | 33 body_(body), |
| 34 weak_factory_(this) { | 34 weak_factory_(this) { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 } | 185 } |
| 186 | 186 |
| 187 void ServiceWorkerControlleeRequestHandler::PrepareForSubResource() { | 187 void ServiceWorkerControlleeRequestHandler::PrepareForSubResource() { |
| 188 DCHECK(job_.get()); | 188 DCHECK(job_.get()); |
| 189 DCHECK(context_); | 189 DCHECK(context_); |
| 190 DCHECK(provider_host_->active_version()); | 190 DCHECK(provider_host_->active_version()); |
| 191 job_->ForwardToServiceWorker(); | 191 job_->ForwardToServiceWorker(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace content | 194 } // namespace content |
| OLD | NEW |