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

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

Issue 508433002: Remove implicit conversions from scoped_refptr to T* in content/browser/service_worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: content/browser/service_worker/service_worker_context_core.cc
diff --git a/content/browser/service_worker/service_worker_context_core.cc b/content/browser/service_worker/service_worker_context_core.cc
index b1d842bd727c7b7adf76d2c40414fa69df34e870..5647ef974e95d7b8414403356bd292894b7ccffb 100644
--- a/content/browser/service_worker/service_worker_context_core.cc
+++ b/content/browser/service_worker/service_worker_context_core.cc
@@ -98,7 +98,8 @@ ServiceWorkerContextCore::ServiceWorkerContextCore(
disk_cache_thread,
quota_manager_proxy)),
cache_manager_(
- ServiceWorkerCacheStorageManager::Create(path, cache_task_runner)),
+ ServiceWorkerCacheStorageManager::Create(path,
+ cache_task_runner.get())),
embedded_worker_registry_(EmbeddedWorkerRegistry::Create(AsWeakPtr())),
job_coordinator_(new ServiceWorkerJobCoordinator(AsWeakPtr())),
next_handle_id_(0),
@@ -242,7 +243,7 @@ void ServiceWorkerContextCore::RegistrationComplete(
callback.Run(status,
registration->id(),
version->version_id());
- if (observer_list_) {
+ if (observer_list_.get()) {
observer_list_->Notify(&ServiceWorkerContextObserver::OnRegistrationStored,
pattern);
}
@@ -253,7 +254,7 @@ void ServiceWorkerContextCore::UnregistrationComplete(
const ServiceWorkerContextCore::UnregistrationCallback& callback,
ServiceWorkerStatusCode status) {
callback.Run(status);
- if (observer_list_) {
+ if (observer_list_.get()) {
observer_list_->Notify(&ServiceWorkerContextObserver::OnRegistrationDeleted,
pattern);
}
@@ -346,7 +347,7 @@ void ServiceWorkerContextCore::SetBlobParametersForCache(
}
void ServiceWorkerContextCore::OnWorkerStarted(ServiceWorkerVersion* version) {
- if (!observer_list_)
+ if (!observer_list_.get())
return;
observer_list_->Notify(&ServiceWorkerContextObserver::OnWorkerStarted,
version->version_id(),
@@ -355,7 +356,7 @@ void ServiceWorkerContextCore::OnWorkerStarted(ServiceWorkerVersion* version) {
}
void ServiceWorkerContextCore::OnWorkerStopped(ServiceWorkerVersion* version) {
- if (!observer_list_)
+ if (!observer_list_.get())
return;
observer_list_->Notify(&ServiceWorkerContextObserver::OnWorkerStopped,
version->version_id(),
@@ -365,7 +366,7 @@ void ServiceWorkerContextCore::OnWorkerStopped(ServiceWorkerVersion* version) {
void ServiceWorkerContextCore::OnVersionStateChanged(
ServiceWorkerVersion* version) {
- if (!observer_list_)
+ if (!observer_list_.get())
return;
observer_list_->Notify(&ServiceWorkerContextObserver::OnVersionStateChanged,
version->version_id());
@@ -377,7 +378,7 @@ void ServiceWorkerContextCore::OnErrorReported(
int line_number,
int column_number,
const GURL& source_url) {
- if (!observer_list_)
+ if (!observer_list_.get())
return;
observer_list_->Notify(
&ServiceWorkerContextObserver::OnErrorReported,
@@ -395,7 +396,7 @@ void ServiceWorkerContextCore::OnReportConsoleMessage(
const base::string16& message,
int line_number,
const GURL& source_url) {
- if (!observer_list_)
+ if (!observer_list_.get())
return;
observer_list_->Notify(
&ServiceWorkerContextObserver::OnReportConsoleMessage,

Powered by Google App Engine
This is Rietveld 408576698