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

Unified Diff: remoting/host/desktop_session_win.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/desktop_session_win.cc
diff --git a/remoting/host/desktop_session_win.cc b/remoting/host/desktop_session_win.cc
index f3c0881d6230be455fadd0dc13220e1a3fe19652..9f607613a72633886dda84893a26309cc5be3e24 100644
--- a/remoting/host/desktop_session_win.cc
+++ b/remoting/host/desktop_session_win.cc
@@ -372,7 +372,7 @@ scoped_ptr<DesktopSession> DesktopSessionWin::CreateForConsole(
caller_task_runner, io_task_runner, daemon_process, id,
HostService::GetInstance()));
- return session.Pass();
+ return std::move(session);
}
// static
@@ -388,7 +388,7 @@ scoped_ptr<DesktopSession> DesktopSessionWin::CreateForVirtualTerminal(
if (!session->Initialize(resolution))
return nullptr;
- return session.Pass();
+ return std::move(session);
}
DesktopSessionWin::DesktopSessionWin(
@@ -536,19 +536,16 @@ void DesktopSessionWin::OnSessionAttached(uint32 session_id) {
kCopiedSwitchNames, arraysize(kCopiedSwitchNames));
// Create a delegate capable of launching a process in a different session.
- scoped_ptr<WtsSessionProcessDelegate> delegate(
- new WtsSessionProcessDelegate(io_task_runner_,
- target.Pass(),
- launch_elevated,
- base::WideToUTF8(
- kDaemonIpcSecurityDescriptor)));
+ scoped_ptr<WtsSessionProcessDelegate> delegate(new WtsSessionProcessDelegate(
+ io_task_runner_, std::move(target), launch_elevated,
+ base::WideToUTF8(kDaemonIpcSecurityDescriptor)));
if (!delegate->Initialize(session_id)) {
TerminateSession();
return;
}
// Create a launcher for the desktop process, using the per-session delegate.
- launcher_.reset(new WorkerProcessLauncher(delegate.Pass(), this));
+ launcher_.reset(new WorkerProcessLauncher(std::move(delegate), this));
}
void DesktopSessionWin::OnSessionDetached() {

Powered by Google App Engine
This is Rietveld 408576698