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

Unified Diff: remoting/host/setup/daemon_controller.cc

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
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: remoting/host/setup/daemon_controller.cc
diff --git a/remoting/host/setup/daemon_controller.cc b/remoting/host/setup/daemon_controller.cc
index dd413b4663aba176c78d352d4f934cf9fe9728fe..e2bf52220ccf6d75d75984a506bc4131a2ccf063 100644
--- a/remoting/host/setup/daemon_controller.cc
+++ b/remoting/host/setup/daemon_controller.cc
@@ -19,7 +19,7 @@ const char kDaemonControllerThreadName[] = "Daemon Controller thread";
DaemonController::DaemonController(scoped_ptr<Delegate> delegate)
: caller_task_runner_(base::ThreadTaskRunnerHandle::Get()),
- delegate_(delegate.Pass()) {
+ delegate_(std::move(delegate)) {
// Launch the delegate thread.
delegate_thread_.reset(new AutoThread(kDaemonControllerThreadName));
#if defined(OS_WIN)
@@ -117,7 +117,7 @@ void DaemonController::DoSetConfigAndStart(
const CompletionCallback& done) {
DCHECK(delegate_task_runner_->BelongsToCurrentThread());
- delegate_->SetConfigAndStart(config.Pass(), consent, done);
+ delegate_->SetConfigAndStart(std::move(config), consent, done);
}
void DaemonController::DoUpdateConfig(
@@ -125,7 +125,7 @@ void DaemonController::DoUpdateConfig(
const CompletionCallback& done) {
DCHECK(delegate_task_runner_->BelongsToCurrentThread());
- delegate_->UpdateConfig(config.Pass(), done);
+ delegate_->UpdateConfig(std::move(config), done);
}
void DaemonController::DoStop(const CompletionCallback& done) {
@@ -163,7 +163,7 @@ void DaemonController::InvokeConfigCallbackAndScheduleNext(
scoped_ptr<base::DictionaryValue> config) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
- done.Run(config.Pass());
+ done.Run(std::move(config));
ScheduleNext();
}

Powered by Google App Engine
This is Rietveld 408576698