| 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 "content/browser/service_worker/service_worker_context_core.h" | 8 #include "content/browser/service_worker/service_worker_context_core.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 #include "webkit/browser/quota/quota_manager.h" | 10 #include "webkit/browser/quota/quota_manager.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 user_data_directory, quota_manager_proxy)); | 34 user_data_directory, quota_manager_proxy)); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void ServiceWorkerContextWrapper::Shutdown() { | 37 void ServiceWorkerContextWrapper::Shutdown() { |
| 38 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { | 38 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
| 39 BrowserThread::PostTask( | 39 BrowserThread::PostTask( |
| 40 BrowserThread::IO, FROM_HERE, | 40 BrowserThread::IO, FROM_HERE, |
| 41 base::Bind(&ServiceWorkerContextWrapper::Shutdown, this)); | 41 base::Bind(&ServiceWorkerContextWrapper::Shutdown, this)); |
| 42 return; | 42 return; |
| 43 } | 43 } |
| 44 context_core_->Shutdown(); |
| 44 context_core_.reset(); | 45 context_core_.reset(); |
| 45 } | 46 } |
| 46 | 47 |
| 47 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { | 48 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { |
| 48 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 49 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 49 return context_core_.get(); | 50 return context_core_.get(); |
| 50 } | 51 } |
| 51 | 52 |
| 52 } // namespace content | 53 } // namespace content |
| OLD | NEW |