| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| 11 #include "content/child/child_thread_impl.h" | 11 #include "content/child/child_thread_impl.h" |
| 12 #include "content/child/service_worker/service_worker_dispatcher.h" | 12 #include "content/child/service_worker/service_worker_dispatcher.h" |
| 13 #include "content/child/service_worker/service_worker_handle_reference.h" | 13 #include "content/child/service_worker/service_worker_handle_reference.h" |
| 14 #include "content/child/service_worker/service_worker_registration_handle_refere
nce.h" | 14 #include "content/child/service_worker/service_worker_registration_handle_refere
nce.h" |
| 15 #include "content/child/thread_safe_sender.h" | 15 #include "content/child/thread_safe_sender.h" |
| 16 #include "content/child/worker_thread_registry.h" | 16 #include "content/child/worker_thread_registry.h" |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 class ServiceWorkerProviderContext::Delegate { | 20 class ServiceWorkerProviderContext::Delegate { |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 void ServiceWorkerProviderContext::DestructOnMainThread() const { | 202 void ServiceWorkerProviderContext::DestructOnMainThread() const { |
| 203 if (!main_thread_task_runner_->RunsTasksOnCurrentThread() && | 203 if (!main_thread_task_runner_->RunsTasksOnCurrentThread() && |
| 204 main_thread_task_runner_->DeleteSoon(FROM_HERE, this)) { | 204 main_thread_task_runner_->DeleteSoon(FROM_HERE, this)) { |
| 205 return; | 205 return; |
| 206 } | 206 } |
| 207 delete this; | 207 delete this; |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace content | 210 } // namespace content |
| OLD | NEW |