| 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 <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 | 837 |
| 838 observer_list_->Notify(FROM_HERE, | 838 observer_list_->Notify(FROM_HERE, |
| 839 &ServiceWorkerContextObserver::OnStorageWiped); | 839 &ServiceWorkerContextObserver::OnStorageWiped); |
| 840 } | 840 } |
| 841 | 841 |
| 842 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { | 842 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { |
| 843 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 843 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 844 return context_core_.get(); | 844 return context_core_.get(); |
| 845 } | 845 } |
| 846 | 846 |
| 847 void ServiceWorkerContextWrapper::CreateService( |
| 848 mojo::InterfaceRequest<blink::mojom::ServiceWorkerService> request) { |
| 849 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
| 850 BrowserThread::PostTask( |
| 851 BrowserThread::IO, FROM_HERE, |
| 852 base::Bind(&ServiceWorkerContextWrapper::CreateService, this, |
| 853 base::Passed(&request))); |
| 854 return; |
| 855 } |
| 856 context_core_->CreateService(std::move(request)); |
| 857 } |
| 858 |
| 847 } // namespace content | 859 } // namespace content |
| OLD | NEW |