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

Unified Diff: remoting/host/setup/host_starter.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/host_starter.cc
diff --git a/remoting/host/setup/host_starter.cc b/remoting/host/setup/host_starter.cc
index 5eda05c52a6f1b285d2f06faaf22be1156227d1d..6d7161d9e23cc6d3205492f21c1952a4474d04b9 100644
--- a/remoting/host/setup/host_starter.cc
+++ b/remoting/host/setup/host_starter.cc
@@ -24,8 +24,8 @@ HostStarter::HostStarter(
scoped_ptr<gaia::GaiaOAuthClient> oauth_client,
scoped_ptr<remoting::ServiceClient> service_client,
scoped_refptr<remoting::DaemonController> daemon_controller)
- : oauth_client_(oauth_client.Pass()),
- service_client_(service_client.Pass()),
+ : oauth_client_(std::move(oauth_client)),
+ service_client_(std::move(service_client)),
daemon_controller_(daemon_controller),
consent_to_data_collection_(false),
unregistering_host_(false),
@@ -48,7 +48,7 @@ scoped_ptr<HostStarter> HostStarter::Create(
scoped_refptr<remoting::DaemonController> daemon_controller(
remoting::DaemonController::Create());
return make_scoped_ptr(new HostStarter(
- oauth_client.Pass(), service_client.Pass(), daemon_controller));
+ std::move(oauth_client), std::move(service_client), daemon_controller));
}
void HostStarter::StartHost(
@@ -170,7 +170,7 @@ void HostStarter::StartHostProcess() {
config->SetString("private_key", key_pair_->ToString());
config->SetString("host_secret_hash", host_secret_hash);
daemon_controller_->SetConfigAndStart(
- config.Pass(), consent_to_data_collection_,
+ std::move(config), consent_to_data_collection_,
base::Bind(&HostStarter::OnHostStarted, base::Unretained(this)));
}

Powered by Google App Engine
This is Rietveld 408576698