| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 const GURL& other_url, | 563 const GURL& other_url, |
| 564 const CheckHasServiceWorkerCallback& callback) { | 564 const CheckHasServiceWorkerCallback& callback) { |
| 565 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { | 565 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
| 566 BrowserThread::PostTask( | 566 BrowserThread::PostTask( |
| 567 BrowserThread::IO, FROM_HERE, | 567 BrowserThread::IO, FROM_HERE, |
| 568 base::Bind(&ServiceWorkerContextWrapper::CheckHasServiceWorker, this, | 568 base::Bind(&ServiceWorkerContextWrapper::CheckHasServiceWorker, this, |
| 569 url, other_url, callback)); | 569 url, other_url, callback)); |
| 570 return; | 570 return; |
| 571 } | 571 } |
| 572 if (!context_core_) { | 572 if (!context_core_) { |
| 573 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 573 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 574 base::Bind(callback, false)); | 574 base::Bind(callback, false)); |
| 575 return; | 575 return; |
| 576 } | 576 } |
| 577 context()->CheckHasServiceWorker( | 577 context()->CheckHasServiceWorker( |
| 578 net::SimplifyUrlForRequest(url), net::SimplifyUrlForRequest(other_url), | 578 net::SimplifyUrlForRequest(url), net::SimplifyUrlForRequest(other_url), |
| 579 base::Bind(&ServiceWorkerContextWrapper::DidCheckHasServiceWorker, this, | 579 base::Bind(&ServiceWorkerContextWrapper::DidCheckHasServiceWorker, this, |
| 580 callback)); | 580 callback)); |
| 581 } | 581 } |
| 582 | 582 |
| 583 void ServiceWorkerContextWrapper::CountExternalRequestsForTest( | 583 void ServiceWorkerContextWrapper::CountExternalRequestsForTest( |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 observer_list_->Notify(FROM_HERE, | 908 observer_list_->Notify(FROM_HERE, |
| 909 &ServiceWorkerContextObserver::OnStorageWiped); | 909 &ServiceWorkerContextObserver::OnStorageWiped); |
| 910 } | 910 } |
| 911 | 911 |
| 912 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { | 912 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { |
| 913 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 913 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 914 return context_core_.get(); | 914 return context_core_.get(); |
| 915 } | 915 } |
| 916 | 916 |
| 917 } // namespace content | 917 } // namespace content |
| OLD | NEW |