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/child/service_worker/web_service_worker_provider_impl.h" | 5 #include "content/child/service_worker/web_service_worker_provider_impl.h" |
6 | 6 |
7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "content/child/child_thread.h" | 9 #include "content/child/child_thread.h" |
10 #include "content/child/service_worker/service_worker_dispatcher.h" | 10 #include "content/child/service_worker/service_worker_dispatcher.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Remove the script client, but only if the dispatcher is still there. | 87 // Remove the script client, but only if the dispatcher is still there. |
88 // (For cleanup path we don't need to bother creating a new dispatcher) | 88 // (For cleanup path we don't need to bother creating a new dispatcher) |
89 ServiceWorkerDispatcher* dispatcher = | 89 ServiceWorkerDispatcher* dispatcher = |
90 ServiceWorkerDispatcher::GetThreadSpecificInstance(); | 90 ServiceWorkerDispatcher::GetThreadSpecificInstance(); |
91 if (dispatcher) | 91 if (dispatcher) |
92 dispatcher->RemoveScriptClient(provider_id_); | 92 dispatcher->RemoveScriptClient(provider_id_); |
93 } | 93 } |
94 | 94 |
95 ServiceWorkerDispatcher* WebServiceWorkerProviderImpl::GetDispatcher() { | 95 ServiceWorkerDispatcher* WebServiceWorkerProviderImpl::GetDispatcher() { |
96 return ServiceWorkerDispatcher::GetOrCreateThreadSpecificInstance( | 96 return ServiceWorkerDispatcher::GetOrCreateThreadSpecificInstance( |
97 thread_safe_sender_); | 97 thread_safe_sender_.get()); |
98 } | 98 } |
99 | 99 |
100 } // namespace content | 100 } // namespace content |
OLD | NEW |