| 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 b9da048c199071bdf1ae92aac9ba74b5bd824860..0a4310edc1c2f202f1c89eafe66a7d4987737562 100644
|
| --- a/content/child/service_worker/service_worker_dispatcher.cc
|
| +++ b/content/child/service_worker/service_worker_dispatcher.cc
|
| @@ -77,6 +77,25 @@ void ServiceWorkerDispatcher::UnregisterServiceWorker(
|
| CurrentWorkerId(), request_id, pattern));
|
| }
|
|
|
| +void ServiceWorkerDispatcher::AddScriptClient(
|
| + int provider_id,
|
| + blink::WebServiceWorkerProviderClient* client) {
|
| + DCHECK(client);
|
| + DCHECK(!ContainsKey(script_clients_, provider_id));
|
| + script_clients_[provider_id] = client;
|
| + thread_safe_sender_->Send(new ServiceWorkerHostMsg_AddScriptClient(
|
| + CurrentWorkerId(), provider_id));
|
| +}
|
| +
|
| +void ServiceWorkerDispatcher::RemoveScriptClient(int provider_id) {
|
| + // This could be possibly called multiple times to ensure termination.
|
| + if (ContainsKey(script_clients_, provider_id)) {
|
| + script_clients_.erase(provider_id);
|
| + thread_safe_sender_->Send(new ServiceWorkerHostMsg_RemoveScriptClient(
|
| + CurrentWorkerId(), provider_id));
|
| + }
|
| +}
|
| +
|
| ServiceWorkerDispatcher* ServiceWorkerDispatcher::ThreadSpecificInstance(
|
| ThreadSafeSender* thread_safe_sender) {
|
| if (g_dispatcher_tls.Pointer()->Get() == kHasBeenDeleted) {
|
|
|