Index: remoting/host/desktop_session_win.cc |
diff --git a/remoting/host/desktop_session_win.cc b/remoting/host/desktop_session_win.cc |
index f9735463ea8fd229080a2a046239aa9fe9fafaa2..3001a131692203655fad1ea0c3ee681b62fa9988 100644 |
--- a/remoting/host/desktop_session_win.cc |
+++ b/remoting/host/desktop_session_win.cc |
@@ -5,7 +5,9 @@ |
#include "remoting/host/desktop_session_win.h" |
#include <sddl.h> |
+ |
#include <limits> |
+#include <utility> |
#include "base/base_switches.h" |
#include "base/command_line.h" |
@@ -369,11 +371,9 @@ scoped_ptr<DesktopSession> DesktopSessionWin::CreateForConsole( |
DaemonProcess* daemon_process, |
int id, |
const ScreenResolution& resolution) { |
- scoped_ptr<ConsoleSession> session(new ConsoleSession( |
+ return make_scoped_ptr(new ConsoleSession( |
caller_task_runner, io_task_runner, daemon_process, id, |
HostService::GetInstance())); |
- |
- return session.Pass(); |
} |
// static |
@@ -389,7 +389,7 @@ scoped_ptr<DesktopSession> DesktopSessionWin::CreateForVirtualTerminal( |
if (!session->Initialize(resolution)) |
return nullptr; |
- return session.Pass(); |
+ return std::move(session); |
} |
DesktopSessionWin::DesktopSessionWin( |
@@ -537,19 +537,16 @@ void DesktopSessionWin::OnSessionAttached(uint32_t 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() { |