| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_provider_host.h" | 5 #include "content/browser/service_worker/service_worker_provider_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/feature_list.h" | 9 #include "base/feature_list.h" |
| 10 #include "base/guid.h" | 10 #include "base/guid.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 DCHECK(worker_clients_.count(client)); | 140 DCHECK(worker_clients_.count(client)); |
| 141 worker_clients_.erase(client); | 141 worker_clients_.erase(client); |
| 142 } | 142 } |
| 143 | 143 |
| 144 ServiceWorkerProviderHost::ServiceWorkerProviderHost( | 144 ServiceWorkerProviderHost::ServiceWorkerProviderHost( |
| 145 int render_process_id, | 145 int render_process_id, |
| 146 ServiceWorkerProviderHostInfo info, | 146 ServiceWorkerProviderHostInfo info, |
| 147 base::WeakPtr<ServiceWorkerContextCore> context, | 147 base::WeakPtr<ServiceWorkerContextCore> context, |
| 148 ServiceWorkerDispatcherHost* dispatcher_host) | 148 ServiceWorkerDispatcherHost* dispatcher_host) |
| 149 : client_uuid_(base::GenerateGUID()), | 149 : client_uuid_(base::GenerateGUID()), |
| 150 create_time_(base::TimeTicks::Now()), |
| 150 render_process_id_(render_process_id), | 151 render_process_id_(render_process_id), |
| 151 render_thread_id_(kDocumentMainThreadId), | 152 render_thread_id_(kDocumentMainThreadId), |
| 152 info_(std::move(info)), | 153 info_(std::move(info)), |
| 153 context_(context), | 154 context_(context), |
| 154 dispatcher_host_(dispatcher_host), | 155 dispatcher_host_(dispatcher_host), |
| 155 allow_association_(true) { | 156 allow_association_(true) { |
| 156 DCHECK_NE(SERVICE_WORKER_PROVIDER_UNKNOWN, info_.type); | 157 DCHECK_NE(SERVICE_WORKER_PROVIDER_UNKNOWN, info_.type); |
| 157 | 158 |
| 158 // PlzNavigate | 159 // PlzNavigate |
| 159 CHECK(render_process_id != ChildProcessHost::kInvalidUniqueID || | 160 CHECK(render_process_id != ChildProcessHost::kInvalidUniqueID || |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 render_thread_id_, provider_id(), | 776 render_thread_id_, provider_id(), |
| 776 GetOrCreateServiceWorkerHandle( | 777 GetOrCreateServiceWorkerHandle( |
| 777 associated_registration_->active_version()), | 778 associated_registration_->active_version()), |
| 778 false /* shouldNotifyControllerChange */, | 779 false /* shouldNotifyControllerChange */, |
| 779 associated_registration_->active_version()->used_features())); | 780 associated_registration_->active_version()->used_features())); |
| 780 } | 781 } |
| 781 } | 782 } |
| 782 } | 783 } |
| 783 | 784 |
| 784 } // namespace content | 785 } // namespace content |
| OLD | NEW |