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

Unified Diff: content/child/service_worker/service_worker_provider_context.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/child/service_worker/service_worker_provider_context.cc
diff --git a/content/child/service_worker/service_worker_provider_context.cc b/content/child/service_worker/service_worker_provider_context.cc
index 37c5a690239fcf12bef270fd63c9a7c0be2af150..9ff307e8ec6978561932d5c6499e7ef23f97380c 100644
--- a/content/child/service_worker/service_worker_provider_context.cc
+++ b/content/child/service_worker/service_worker_provider_context.cc
@@ -4,6 +4,8 @@
#include "content/child/service_worker/service_worker_provider_context.h"
+#include <utility>
+
#include "base/macros.h"
#include "base/thread_task_runner_handle.h"
#include "content/child/child_thread_impl.h"
@@ -47,7 +49,7 @@ class ServiceWorkerProviderContext::ControlleeDelegate
scoped_ptr<ServiceWorkerHandleReference> waiting,
scoped_ptr<ServiceWorkerHandleReference> active) override {
DCHECK(!registration_);
- registration_ = registration.Pass();
+ registration_ = std::move(registration);
}
void DisassociateRegistration() override {
@@ -60,7 +62,7 @@ class ServiceWorkerProviderContext::ControlleeDelegate
DCHECK(registration_);
DCHECK(!controller ||
controller->handle_id() != kInvalidServiceWorkerHandleId);
- controller_ = controller.Pass();
+ controller_ = std::move(controller);
}
void GetAssociatedRegistration(
@@ -94,10 +96,10 @@ class ServiceWorkerProviderContext::ControllerDelegate
scoped_ptr<ServiceWorkerHandleReference> waiting,
scoped_ptr<ServiceWorkerHandleReference> active) override {
DCHECK(!registration_);
- registration_ = registration.Pass();
- installing_ = installing.Pass();
- waiting_ = waiting.Pass();
- active_ = active.Pass();
+ registration_ = std::move(registration);
+ installing_ = std::move(installing);
+ waiting_ = std::move(waiting);
+ active_ = std::move(active);
}
void DisassociateRegistration() override {
@@ -169,8 +171,9 @@ void ServiceWorkerProviderContext::OnAssociateRegistration(
scoped_ptr<ServiceWorkerHandleReference> waiting,
scoped_ptr<ServiceWorkerHandleReference> active) {
DCHECK(main_thread_task_runner_->RunsTasksOnCurrentThread());
- delegate_->AssociateRegistration(registration.Pass(), installing.Pass(),
- waiting.Pass(), active.Pass());
+ delegate_->AssociateRegistration(std::move(registration),
+ std::move(installing), std::move(waiting),
+ std::move(active));
}
void ServiceWorkerProviderContext::OnDisassociateRegistration() {
@@ -181,7 +184,7 @@ void ServiceWorkerProviderContext::OnDisassociateRegistration() {
void ServiceWorkerProviderContext::OnSetControllerServiceWorker(
scoped_ptr<ServiceWorkerHandleReference> controller) {
DCHECK(main_thread_task_runner_->RunsTasksOnCurrentThread());
- delegate_->SetController(controller.Pass());
+ delegate_->SetController(std::move(controller));
}
void ServiceWorkerProviderContext::GetAssociatedRegistration(

Powered by Google App Engine
This is Rietveld 408576698