Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: content/browser/service_worker/service_worker_context_wrapper.cc

Issue 1294243004: PlzNavigate: Make ServiceWorker work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 if (context_core_)
michaeln 2015/10/08 02:18:51 nit: for consistency, it'd be good to phrase this
632 context_core_->RemoveNavigationProviderHost(provider_id);
633 }
634
628 void ServiceWorkerContextWrapper::InitInternal( 635 void ServiceWorkerContextWrapper::InitInternal(
629 const base::FilePath& user_data_directory, 636 const base::FilePath& user_data_directory,
630 scoped_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager, 637 scoped_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager,
631 const scoped_refptr<base::SingleThreadTaskRunner>& disk_cache_thread, 638 const scoped_refptr<base::SingleThreadTaskRunner>& disk_cache_thread,
632 storage::QuotaManagerProxy* quota_manager_proxy, 639 storage::QuotaManagerProxy* quota_manager_proxy,
633 storage::SpecialStoragePolicy* special_storage_policy) { 640 storage::SpecialStoragePolicy* special_storage_policy) {
634 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { 641 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
635 BrowserThread::PostTask( 642 BrowserThread::PostTask(
636 BrowserThread::IO, 643 BrowserThread::IO,
637 FROM_HERE, 644 FROM_HERE,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 observer_list_->Notify(FROM_HERE, 687 observer_list_->Notify(FROM_HERE,
681 &ServiceWorkerContextObserver::OnStorageWiped); 688 &ServiceWorkerContextObserver::OnStorageWiped);
682 } 689 }
683 690
684 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { 691 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() {
685 DCHECK_CURRENTLY_ON(BrowserThread::IO); 692 DCHECK_CURRENTLY_ON(BrowserThread::IO);
686 return context_core_.get(); 693 return context_core_.get();
687 } 694 }
688 695
689 } // namespace content 696 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698