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

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

Issue 2181553003: Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use std::move Created 4 years, 5 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_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..f17ab6589c84476b05b6a7bfa9a2622eb60c2a57 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -152,7 +152,7 @@ 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;
nhiroki 2016/07/25 09:15:40 std::move
horo 2016/07/25 09:32:01 Done.
@@ -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);

Powered by Google App Engine
This is Rietveld 408576698