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_registration.h" | 5 #include "content/browser/service_worker/service_worker_registration.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "content/browser/service_worker/service_worker_context_core.h" | 9 #include "content/browser/service_worker/service_worker_context_core.h" |
10 #include "content/browser/service_worker/service_worker_info.h" | 10 #include "content/browser/service_worker/service_worker_info.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 DCHECK(active_version()); | 185 DCHECK(active_version()); |
186 | 186 |
187 for (std::unique_ptr<ServiceWorkerContextCore::ProviderHostIterator> it = | 187 for (std::unique_ptr<ServiceWorkerContextCore::ProviderHostIterator> it = |
188 context_->GetProviderHostIterator(); | 188 context_->GetProviderHostIterator(); |
189 !it->IsAtEnd(); it->Advance()) { | 189 !it->IsAtEnd(); it->Advance()) { |
190 ServiceWorkerProviderHost* host = it->GetProviderHost(); | 190 ServiceWorkerProviderHost* host = it->GetProviderHost(); |
191 if (host->IsHostToRunningServiceWorker()) | 191 if (host->IsHostToRunningServiceWorker()) |
192 continue; | 192 continue; |
193 if (host->controlling_version() == active_version()) | 193 if (host->controlling_version() == active_version()) |
194 continue; | 194 continue; |
| 195 if (!host->IsContextSecureForServiceWorker()) |
| 196 continue; |
195 if (host->MatchRegistration() == this) | 197 if (host->MatchRegistration() == this) |
196 host->ClaimedByRegistration(this); | 198 host->ClaimedByRegistration(this); |
197 } | 199 } |
198 } | 200 } |
199 | 201 |
200 void ServiceWorkerRegistration::ClearWhenReady() { | 202 void ServiceWorkerRegistration::ClearWhenReady() { |
201 DCHECK(context_); | 203 DCHECK(context_); |
202 if (is_uninstalling_) | 204 if (is_uninstalling_) |
203 return; | 205 return; |
204 is_uninstalling_ = true; | 206 is_uninstalling_ = true; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 if (!context_) { | 430 if (!context_) { |
429 callback.Run(SERVICE_WORKER_ERROR_ABORT); | 431 callback.Run(SERVICE_WORKER_ERROR_ABORT); |
430 return; | 432 return; |
431 } | 433 } |
432 context_->storage()->NotifyDoneInstallingRegistration( | 434 context_->storage()->NotifyDoneInstallingRegistration( |
433 this, version.get(), status); | 435 this, version.get(), status); |
434 callback.Run(status); | 436 callback.Run(status); |
435 } | 437 } |
436 | 438 |
437 } // namespace content | 439 } // namespace content |
OLD | NEW |