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

Unified Diff: chrome/browser/service_process/service_process_control.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (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: chrome/browser/service_process/service_process_control.cc
diff --git a/chrome/browser/service_process/service_process_control.cc b/chrome/browser/service_process/service_process_control.cc
index f16da9c76ae318d00a9d310f0b8b46e164a08086..533f765c27f34250e3822183033356743bc491d2 100644
--- a/chrome/browser/service_process/service_process_control.cc
+++ b/chrome/browser/service_process/service_process_control.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/service_process/service_process_control.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
@@ -57,7 +59,7 @@ void ServiceProcessControl::ConnectInternal() {
}
void ServiceProcessControl::SetChannel(scoped_ptr<IPC::ChannelProxy> channel) {
- channel_ = channel.Pass();
+ channel_ = std::move(channel);
}
void ServiceProcessControl::RunConnectDoneTasks() {
@@ -118,7 +120,7 @@ void ServiceProcessControl::Launch(const base::Closure& success_task,
scoped_ptr<base::CommandLine> cmd_line(CreateServiceProcessCommandLine());
// And then start the process asynchronously.
- launcher_ = new Launcher(cmd_line.Pass());
+ launcher_ = new Launcher(std::move(cmd_line));
launcher_->Run(base::Bind(&ServiceProcessControl::OnProcessLaunched,
base::Unretained(this)));
}
@@ -323,10 +325,7 @@ ServiceProcessControl* ServiceProcessControl::GetInstance() {
ServiceProcessControl::Launcher::Launcher(
scoped_ptr<base::CommandLine> cmd_line)
- : cmd_line_(cmd_line.Pass()),
- launched_(false),
- retry_count_(0) {
-}
+ : cmd_line_(std::move(cmd_line)), launched_(false), retry_count_(0) {}
// Execute the command line to start the process asynchronously.
// After the command is executed, |task| is called with the process handle on

Powered by Google App Engine
This is Rietveld 408576698