OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/service_worker_provider_context.h" | 5 #include "content/child/service_worker/service_worker_provider_context.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
8 #include "content/child/child_thread_impl.h" | 9 #include "content/child/child_thread_impl.h" |
9 #include "content/child/service_worker/service_worker_dispatcher.h" | 10 #include "content/child/service_worker/service_worker_dispatcher.h" |
10 #include "content/child/service_worker/service_worker_handle_reference.h" | 11 #include "content/child/service_worker/service_worker_handle_reference.h" |
11 #include "content/child/service_worker/service_worker_registration_handle_refere
nce.h" | 12 #include "content/child/service_worker/service_worker_registration_handle_refere
nce.h" |
12 #include "content/child/thread_safe_sender.h" | 13 #include "content/child/thread_safe_sender.h" |
13 #include "content/child/worker_thread_registry.h" | 14 #include "content/child/worker_thread_registry.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 198 |
198 void ServiceWorkerProviderContext::DestructOnMainThread() const { | 199 void ServiceWorkerProviderContext::DestructOnMainThread() const { |
199 if (!main_thread_task_runner_->RunsTasksOnCurrentThread() && | 200 if (!main_thread_task_runner_->RunsTasksOnCurrentThread() && |
200 main_thread_task_runner_->DeleteSoon(FROM_HERE, this)) { | 201 main_thread_task_runner_->DeleteSoon(FROM_HERE, this)) { |
201 return; | 202 return; |
202 } | 203 } |
203 delete this; | 204 delete this; |
204 } | 205 } |
205 | 206 |
206 } // namespace content | 207 } // namespace content |
OLD | NEW |