| 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..812b509ff39d2199b6569035939026527c74cdbb 100644
|
| --- a/content/browser/service_worker/service_worker_provider_host.cc
|
| +++ b/content/browser/service_worker/service_worker_provider_host.cc
|
| @@ -293,6 +293,19 @@ void ServiceWorkerProviderHost::RemoveMatchingRegistration(
|
| matching_registrations_.erase(key);
|
| }
|
|
|
| +void ServiceWorkerProviderHost::AddAllMatchingRegistrations() {
|
| + DCHECK(context_);
|
| + const std::map<int64, ServiceWorkerRegistration*>& registrations =
|
| + context_->GetLiveRegistrations();
|
| + for (const auto& key_registration : registrations) {
|
| + ServiceWorkerRegistration* registration = key_registration.second;
|
| + if (!registration->is_uninstalled() &&
|
| + ServiceWorkerUtils::ScopeMatches(registration->pattern(),
|
| + document_url_))
|
| + AddMatchingRegistration(registration);
|
| + }
|
| +}
|
| +
|
| ServiceWorkerRegistration*
|
| ServiceWorkerProviderHost::MatchRegistration() const {
|
| ServiceWorkerRegistrationMap::const_reverse_iterator it =
|
|
|