Chromium Code Reviews| Index: content/browser/service_worker/service_worker_provider_host.cc |
| diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc |
| index 878aa2a933cbc1861b365e5929479795d753ebab..d17d2f7f52effa28901aeb0f3a5e0e7e8a4957ed 100644 |
| --- a/content/browser/service_worker/service_worker_provider_host.cc |
| +++ b/content/browser/service_worker/service_worker_provider_host.cc |
| @@ -307,6 +307,19 @@ ServiceWorkerProviderHost::MatchRegistration() const { |
| return nullptr; |
| } |
| +void ServiceWorkerProviderHost::CopyMatchingRegistrations() { |
| + DCHECK(context_); |
| + const std::map<int64, ServiceWorkerRegistration*>& registrations = |
| + context_->GetLiveRegistrations(); |
| + for (auto& key_registration : registrations) { |
|
falken
2015/06/24 02:24:26
nit: extra space. (i just always use "git-cl forma
michaeln
2015/06/24 19:47:22
does const auto& work?
xiang
2015/06/25 05:37:32
Done.
xiang
2015/06/25 05:37:32
Done.
|
| + ServiceWorkerRegistration* registration = key_registration.second; |
| + if (!registration->is_uninstalled() && |
| + ServiceWorkerUtils::ScopeMatches(registration->pattern(), |
| + document_url_)) |
| + AddMatchingRegistration(registration); |
| + } |
| +} |
| + |
| void ServiceWorkerProviderHost::NotifyControllerLost() { |
| SetControllerVersionAttribute(nullptr, true /* notify_controllerchange */); |
| } |