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 fbfb635c3ba80d4e9cca356aca8b661f04c343b5..b6125adcb1a3cd6c9b1b53c56484531aff98081a 100644 |
--- a/content/browser/service_worker/service_worker_register_job.cc |
+++ b/content/browser/service_worker/service_worker_register_job.cc |
@@ -152,10 +152,10 @@ ServiceWorkerRegisterJob::Internal::Internal() {} |
ServiceWorkerRegisterJob::Internal::~Internal() {} |
void ServiceWorkerRegisterJob::set_registration( |
- const scoped_refptr<ServiceWorkerRegistration>& registration) { |
+ scoped_refptr<ServiceWorkerRegistration> registration) { |
DCHECK(phase_ == START || phase_ == REGISTER) << phase_; |
DCHECK(!internal_.registration.get()); |
- internal_.registration = registration; |
+ internal_.registration = std::move(registration); |
} |
ServiceWorkerRegistration* ServiceWorkerRegisterJob::registration() { |
@@ -209,7 +209,7 @@ void ServiceWorkerRegisterJob::SetPhase(Phase phase) { |
// Throughout this file, comments in quotes are excerpts from the spec. |
void ServiceWorkerRegisterJob::ContinueWithRegistration( |
ServiceWorkerStatusCode status, |
- const scoped_refptr<ServiceWorkerRegistration>& existing_registration) { |
+ scoped_refptr<ServiceWorkerRegistration> existing_registration) { |
DCHECK_EQ(REGISTRATION_JOB, job_type_); |
if (status != SERVICE_WORKER_ERROR_NOT_FOUND && status != SERVICE_WORKER_OK) { |
Complete(status); |
@@ -248,7 +248,7 @@ void ServiceWorkerRegisterJob::ContinueWithRegistration( |
void ServiceWorkerRegisterJob::ContinueWithUpdate( |
ServiceWorkerStatusCode status, |
- const scoped_refptr<ServiceWorkerRegistration>& existing_registration) { |
+ scoped_refptr<ServiceWorkerRegistration> existing_registration) { |
DCHECK_EQ(UPDATE_JOB, job_type_); |
if (status != SERVICE_WORKER_OK) { |
Complete(status); |
@@ -294,7 +294,7 @@ void ServiceWorkerRegisterJob::RegisterAndContinue() { |
} |
void ServiceWorkerRegisterJob::ContinueWithUninstallingRegistration( |
- const scoped_refptr<ServiceWorkerRegistration>& existing_registration, |
+ scoped_refptr<ServiceWorkerRegistration> existing_registration, |
ServiceWorkerStatusCode status) { |
if (status != SERVICE_WORKER_OK) { |
Complete(status); |
@@ -306,7 +306,7 @@ void ServiceWorkerRegisterJob::ContinueWithUninstallingRegistration( |
} |
void ServiceWorkerRegisterJob::ContinueWithRegistrationForSameScriptUrl( |
- const scoped_refptr<ServiceWorkerRegistration>& existing_registration, |
+ scoped_refptr<ServiceWorkerRegistration> existing_registration, |
ServiceWorkerStatusCode status) { |
if (status != SERVICE_WORKER_OK) { |
Complete(status); |