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

Unified Diff: content/browser/service_worker/service_worker_context_wrapper.cc

Issue 2925423002: Move all calls on ServiceWorkerContextCoreObserver to ServiceWorkerContextCore. (Closed)
Patch Set: No need to pass observer_list Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/service_worker/service_worker_context_wrapper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_context_wrapper.cc
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 011e8b3f784b4cccd720de7448bda706be16e870..80155bb1a7ffbe68103f5a7a133df9a1c8457637 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -104,7 +104,7 @@ bool ServiceWorkerContext::IsExcludedHeaderNameForFetchEvent(
ServiceWorkerContextWrapper::ServiceWorkerContextWrapper(
BrowserContext* browser_context)
- : observer_list_(
+ : core_observer_list_(
new base::ObserverListThreadSafe<ServiceWorkerContextCoreObserver>()),
process_manager_(new ServiceWorkerProcessManager(browser_context)),
is_incognito_(false),
@@ -740,12 +740,12 @@ void ServiceWorkerContextWrapper::GetUserDataForAllRegistrationsByKeyPrefix(
void ServiceWorkerContextWrapper::AddObserver(
ServiceWorkerContextCoreObserver* observer) {
- observer_list_->AddObserver(observer);
+ core_observer_list_->AddObserver(observer);
}
void ServiceWorkerContextWrapper::RemoveObserver(
ServiceWorkerContextCoreObserver* observer) {
- observer_list_->RemoveObserver(observer);
+ core_observer_list_->RemoveObserver(observer);
}
bool ServiceWorkerContextWrapper::OriginHasForeignFetchRegistrations(
@@ -781,7 +781,8 @@ void ServiceWorkerContextWrapper::InitInternal(
}
context_core_.reset(new ServiceWorkerContextCore(
user_data_directory, std::move(database_task_manager), disk_cache_thread,
- quota_manager_proxy, special_storage_policy, observer_list_.get(), this));
+ quota_manager_proxy, special_storage_policy, core_observer_list_.get(),
+ this));
}
void ServiceWorkerContextWrapper::ShutdownOnIO() {
@@ -821,9 +822,7 @@ void ServiceWorkerContextWrapper::DidDeleteAndStartOver(
}
context_core_.reset(new ServiceWorkerContextCore(context_core_.get(), this));
DVLOG(1) << "Restarted ServiceWorkerContextCore successfully.";
-
- observer_list_->Notify(FROM_HERE,
- &ServiceWorkerContextCoreObserver::OnStorageWiped);
+ context_core_->OnStorageWiped();
}
void ServiceWorkerContextWrapper::BindWorkerFetchContext(
« no previous file with comments | « content/browser/service_worker/service_worker_context_wrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698