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

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: include <utility> 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
« no previous file with comments | « remoting/host/server_log_entry_host.cc ('k') | remoting/host/setup/daemon_controller_delegate_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/daemon_controller.cc
diff --git a/remoting/host/setup/daemon_controller.cc b/remoting/host/setup/daemon_controller.cc
index 34403efd38d8e6558f9b76de461c824cf4088426..f871d43d963bc1b1007742fb72bbcb348abbf092 100644
--- a/remoting/host/setup/daemon_controller.cc
+++ b/remoting/host/setup/daemon_controller.cc
@@ -4,6 +4,8 @@
#include "remoting/host/setup/daemon_controller.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
@@ -20,7 +22,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)
@@ -118,7 +120,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(
@@ -126,7 +128,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) {
@@ -164,7 +166,7 @@ void DaemonController::InvokeConfigCallbackAndScheduleNext(
scoped_ptr<base::DictionaryValue> config) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
- done.Run(config.Pass());
+ done.Run(std::move(config));
ScheduleNext();
}
« no previous file with comments | « remoting/host/server_log_entry_host.cc ('k') | remoting/host/setup/daemon_controller_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698