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

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

Issue 513323002: Service worker fixups for scoped_refptr operator T* removal. (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
« no previous file with comments | « content/browser/service_worker/service_worker_register_job.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_register_job.cc
diff --git a/content/browser/service_worker/service_worker_register_job.cc b/content/browser/service_worker/service_worker_register_job.cc
index 2276cf87089ee5a4bf10e858f0ae89754e971166..8b3f388b019dc9b024e508865bc5392f48c9249c 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -117,7 +117,7 @@ ServiceWorkerRegisterJob::Internal::Internal() {}
ServiceWorkerRegisterJob::Internal::~Internal() {}
void ServiceWorkerRegisterJob::set_registration(
- ServiceWorkerRegistration* registration) {
+ const scoped_refptr<ServiceWorkerRegistration>& registration) {
DCHECK(phase_ == START || phase_ == REGISTER) << phase_;
DCHECK(!internal_.registration.get());
internal_.registration = registration;
@@ -141,7 +141,7 @@ ServiceWorkerVersion* ServiceWorkerRegisterJob::new_version() {
}
void ServiceWorkerRegisterJob::set_uninstalling_registration(
- ServiceWorkerRegistration* registration) {
+ const scoped_refptr<ServiceWorkerRegistration>& registration) {
DCHECK_EQ(phase_, WAIT_FOR_UNINSTALL);
internal_.uninstalling_registration = registration;
}
@@ -149,7 +149,7 @@ void ServiceWorkerRegisterJob::set_uninstalling_registration(
ServiceWorkerRegistration*
ServiceWorkerRegisterJob::uninstalling_registration() {
DCHECK_EQ(phase_, WAIT_FOR_UNINSTALL);
- return internal_.uninstalling_registration;
+ return internal_.uninstalling_registration.get();
}
void ServiceWorkerRegisterJob::SetPhase(Phase phase) {
@@ -297,8 +297,9 @@ void ServiceWorkerRegisterJob::ContinueWithRegistrationForSameScriptUrl(
return;
}
- ResolvePromise(
- status, existing_registration, existing_registration->active_version());
+ ResolvePromise(status,
+ existing_registration.get(),
+ existing_registration->active_version());
Complete(SERVICE_WORKER_OK);
}
« no previous file with comments | « content/browser/service_worker/service_worker_register_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698