Chromium Code Reviews| 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 <vector> | 10 #include <vector> |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 618 void ServiceWorkerContextWrapper::AddObserver( | 618 void ServiceWorkerContextWrapper::AddObserver( |
| 619 ServiceWorkerContextObserver* observer) { | 619 ServiceWorkerContextObserver* observer) { |
| 620 observer_list_->AddObserver(observer); | 620 observer_list_->AddObserver(observer); |
| 621 } | 621 } |
| 622 | 622 |
| 623 void ServiceWorkerContextWrapper::RemoveObserver( | 623 void ServiceWorkerContextWrapper::RemoveObserver( |
| 624 ServiceWorkerContextObserver* observer) { | 624 ServiceWorkerContextObserver* observer) { |
| 625 observer_list_->RemoveObserver(observer); | 625 observer_list_->RemoveObserver(observer); |
| 626 } | 626 } |
| 627 | 627 |
| 628 void ServiceWorkerContextWrapper::RemoveNavigationProviderHost( | |
| 629 int provider_id) { | |
| 630 DCHECK_CURRENTLY_ON(BrowserThread::IO); | |
| 631 context_core_->RemoveNavigationProviderHost(provider_id); | |
|
michaeln
2015/10/07 01:16:44
contenxt_core_ is a weakptr, so early return if nu
Fabrice (no longer in Chrome)
2015/10/07 12:59:43
Done.
| |
| 632 } | |
| 633 | |
| 628 void ServiceWorkerContextWrapper::InitInternal( | 634 void ServiceWorkerContextWrapper::InitInternal( |
| 629 const base::FilePath& user_data_directory, | 635 const base::FilePath& user_data_directory, |
| 630 scoped_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager, | 636 scoped_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager, |
| 631 const scoped_refptr<base::SingleThreadTaskRunner>& disk_cache_thread, | 637 const scoped_refptr<base::SingleThreadTaskRunner>& disk_cache_thread, |
| 632 storage::QuotaManagerProxy* quota_manager_proxy, | 638 storage::QuotaManagerProxy* quota_manager_proxy, |
| 633 storage::SpecialStoragePolicy* special_storage_policy) { | 639 storage::SpecialStoragePolicy* special_storage_policy) { |
| 634 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { | 640 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
| 635 BrowserThread::PostTask( | 641 BrowserThread::PostTask( |
| 636 BrowserThread::IO, | 642 BrowserThread::IO, |
| 637 FROM_HERE, | 643 FROM_HERE, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 680 observer_list_->Notify(FROM_HERE, | 686 observer_list_->Notify(FROM_HERE, |
| 681 &ServiceWorkerContextObserver::OnStorageWiped); | 687 &ServiceWorkerContextObserver::OnStorageWiped); |
| 682 } | 688 } |
| 683 | 689 |
| 684 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { | 690 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { |
| 685 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 691 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 686 return context_core_.get(); | 692 return context_core_.get(); |
| 687 } | 693 } |
| 688 | 694 |
| 689 } // namespace content | 695 } // namespace content |
| OLD | NEW |