| 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/browser/service_worker/service_worker_context_wrapper.h" | 5 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/threading/sequenced_worker_pool.h" | 8 #include "base/threading/sequenced_worker_pool.h" |
| 9 #include "content/browser/service_worker/service_worker_context_core.h" | 9 #include "content/browser/service_worker/service_worker_context_core.h" |
| 10 #include "content/browser/service_worker/service_worker_context_observer.h" | 10 #include "content/browser/service_worker/service_worker_context_observer.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 pattern, | 110 pattern, |
| 111 continuation)); | 111 continuation)); |
| 112 return; | 112 return; |
| 113 } | 113 } |
| 114 | 114 |
| 115 context()->UnregisterServiceWorker( | 115 context()->UnregisterServiceWorker( |
| 116 pattern, | 116 pattern, |
| 117 base::Bind(&FinishUnregistrationOnIO, continuation)); | 117 base::Bind(&FinishUnregistrationOnIO, continuation)); |
| 118 } | 118 } |
| 119 | 119 |
| 120 void ServiceWorkerContextWrapper::Terminate() { |
| 121 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 122 process_manager_->Shutdown(); |
| 123 } |
| 124 |
| 120 void ServiceWorkerContextWrapper::AddObserver( | 125 void ServiceWorkerContextWrapper::AddObserver( |
| 121 ServiceWorkerContextObserver* observer) { | 126 ServiceWorkerContextObserver* observer) { |
| 122 observer_list_->AddObserver(observer); | 127 observer_list_->AddObserver(observer); |
| 123 } | 128 } |
| 124 | 129 |
| 125 void ServiceWorkerContextWrapper::RemoveObserver( | 130 void ServiceWorkerContextWrapper::RemoveObserver( |
| 126 ServiceWorkerContextObserver* observer) { | 131 ServiceWorkerContextObserver* observer) { |
| 127 observer_list_->RemoveObserver(observer); | 132 observer_list_->RemoveObserver(observer); |
| 128 } | 133 } |
| 129 | 134 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 152 observer_list_, | 157 observer_list_, |
| 153 this)); | 158 this)); |
| 154 } | 159 } |
| 155 | 160 |
| 156 void ServiceWorkerContextWrapper::ShutdownOnIO() { | 161 void ServiceWorkerContextWrapper::ShutdownOnIO() { |
| 157 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 162 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 158 context_core_.reset(); | 163 context_core_.reset(); |
| 159 } | 164 } |
| 160 | 165 |
| 161 } // namespace content | 166 } // namespace content |
| OLD | NEW |