| 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/child/service_worker/service_worker_network_provider.h" | 5 #include "content/child/service_worker/service_worker_network_provider.h" |
| 6 | 6 |
| 7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
| 8 #include "content/child/child_thread_impl.h" | 8 #include "content/child/child_thread_impl.h" |
| 9 #include "content/child/request_extra_data.h" | 9 #include "content/child/request_extra_data.h" |
| 10 #include "content/child/service_worker/service_worker_handle_reference.h" | 10 #include "content/child/service_worker/service_worker_handle_reference.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 int64_t version_id, | 222 int64_t version_id, |
| 223 int embedded_worker_id) { | 223 int embedded_worker_id) { |
| 224 DCHECK_NE(kInvalidServiceWorkerProviderId, provider_id_); | 224 DCHECK_NE(kInvalidServiceWorkerProviderId, provider_id_); |
| 225 if (!ChildThreadImpl::current()) | 225 if (!ChildThreadImpl::current()) |
| 226 return; // May be null in some tests. | 226 return; // May be null in some tests. |
| 227 dispatcher_host_->OnSetHostedVersionId(provider_id(), version_id, | 227 dispatcher_host_->OnSetHostedVersionId(provider_id(), version_id, |
| 228 embedded_worker_id); | 228 embedded_worker_id); |
| 229 } | 229 } |
| 230 | 230 |
| 231 bool ServiceWorkerNetworkProvider::IsControlledByServiceWorker() const { | 231 bool ServiceWorkerNetworkProvider::IsControlledByServiceWorker() const { |
| 232 if (ServiceWorkerUtils::IsServicificationEnabled()) { |
| 233 // Interception for subresource loading is not working (yet) |
| 234 // when servicification is enabled. |
| 235 return false; |
| 236 } |
| 232 return context() && context()->controller(); | 237 return context() && context()->controller(); |
| 233 } | 238 } |
| 234 | 239 |
| 235 } // namespace content | 240 } // namespace content |
| OLD | NEW |