| Index: content/child/service_worker/service_worker_dispatcher.cc
|
| diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
|
| index fce8783f92a32de78ef49bb677e70adc834b9bd4..236d8fe7484593c4a3515085a6753a3d6f531e46 100644
|
| --- a/content/child/service_worker/service_worker_dispatcher.cc
|
| +++ b/content/child/service_worker/service_worker_dispatcher.cc
|
| @@ -285,6 +285,7 @@ ServiceWorkerDispatcher::FindServiceWorkerRegistration(
|
|
|
| WebServiceWorkerRegistrationImpl*
|
| ServiceWorkerDispatcher::CreateServiceWorkerRegistration(
|
| + int provider_id,
|
| const ServiceWorkerRegistrationObjectInfo& info,
|
| bool adopt_handle) {
|
| DCHECK(!FindServiceWorkerRegistration(info, adopt_handle));
|
| @@ -299,7 +300,7 @@ ServiceWorkerDispatcher::CreateServiceWorkerRegistration(
|
|
|
| // WebServiceWorkerRegistrationImpl constructor calls
|
| // AddServiceWorkerRegistration.
|
| - return new WebServiceWorkerRegistrationImpl(handle_ref.Pass());
|
| + return new WebServiceWorkerRegistrationImpl(provider_id, handle_ref.Pass());
|
| }
|
|
|
| // We can assume that this message handler is called before the worker context
|
| @@ -356,6 +357,7 @@ void ServiceWorkerDispatcher::OnDisassociateRegistration(
|
| void ServiceWorkerDispatcher::OnRegistered(
|
| int thread_id,
|
| int request_id,
|
| + int provider_id,
|
| const ServiceWorkerRegistrationObjectInfo& info,
|
| const ServiceWorkerVersionAttributes& attrs) {
|
| TRACE_EVENT_ASYNC_STEP_INTO0("ServiceWorker",
|
| @@ -371,7 +373,7 @@ void ServiceWorkerDispatcher::OnRegistered(
|
| if (!callbacks)
|
| return;
|
|
|
| - callbacks->onSuccess(FindOrCreateRegistration(info, attrs));
|
| + callbacks->onSuccess(FindOrCreateRegistration(provider_id, info, attrs));
|
| pending_registration_callbacks_.Remove(request_id);
|
| }
|
|
|
| @@ -398,6 +400,7 @@ void ServiceWorkerDispatcher::OnUnregistered(int thread_id,
|
| void ServiceWorkerDispatcher::OnDidGetRegistration(
|
| int thread_id,
|
| int request_id,
|
| + int provider_id,
|
| const ServiceWorkerRegistrationObjectInfo& info,
|
| const ServiceWorkerVersionAttributes& attrs) {
|
| TRACE_EVENT_ASYNC_STEP_INTO0(
|
| @@ -416,7 +419,7 @@ void ServiceWorkerDispatcher::OnDidGetRegistration(
|
|
|
| WebServiceWorkerRegistrationImpl* registration = NULL;
|
| if (info.handle_id != kInvalidServiceWorkerHandleId)
|
| - registration = FindOrCreateRegistration(info, attrs);
|
| + registration = FindOrCreateRegistration(provider_id, info, attrs);
|
|
|
| callbacks->onSuccess(registration);
|
| pending_get_registration_callbacks_.Remove(request_id);
|
| @@ -594,7 +597,7 @@ void ServiceWorkerDispatcher::SetReadyRegistration(
|
| WebServiceWorkerRegistrationImpl* registration =
|
| FindServiceWorkerRegistration(info, false);
|
| if (!registration) {
|
| - registration = CreateServiceWorkerRegistration(info, false);
|
| + registration = CreateServiceWorkerRegistration(provider_id, info, false);
|
| registration->SetInstalling(GetServiceWorker(attrs.installing, false));
|
| registration->SetWaiting(GetServiceWorker(attrs.waiting, false));
|
| registration->SetActive(GetServiceWorker(attrs.active, false));
|
| @@ -713,12 +716,13 @@ void ServiceWorkerDispatcher::RemoveServiceWorkerRegistration(
|
|
|
| WebServiceWorkerRegistrationImpl*
|
| ServiceWorkerDispatcher::FindOrCreateRegistration(
|
| + int provider_id,
|
| const ServiceWorkerRegistrationObjectInfo& info,
|
| const ServiceWorkerVersionAttributes& attrs) {
|
| WebServiceWorkerRegistrationImpl* registration =
|
| FindServiceWorkerRegistration(info, true);
|
| if (!registration) {
|
| - registration = CreateServiceWorkerRegistration(info, true);
|
| + registration = CreateServiceWorkerRegistration(provider_id, info, true);
|
| registration->SetInstalling(GetServiceWorker(attrs.installing, true));
|
| registration->SetWaiting(GetServiceWorker(attrs.waiting, true));
|
| registration->SetActive(GetServiceWorker(attrs.active, true));
|
|
|