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

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: 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/desktop_session_proxy.cc ('k') | remoting/host/desktop_shape_tracker_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/desktop_shape_tracker_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698