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

Unified Diff: remoting/host/client_session_unittest.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/client_session.cc ('k') | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session_unittest.cc
diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc
index 45ad65b06d7014febb5c84b840e49fadb024e550..dade4725c47d213c20f7787d3a61c566d5a9f08a 100644
--- a/remoting/host/client_session_unittest.cc
+++ b/remoting/host/client_session_unittest.cc
@@ -2,10 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "remoting/host/client_session.h"
+
#include <stdint.h>
#include <algorithm>
#include <string>
+#include <utility>
#include <vector>
#include "base/message_loop/message_loop.h"
@@ -16,7 +19,6 @@
#include "remoting/base/auto_thread_task_runner.h"
#include "remoting/base/constants.h"
#include "remoting/codec/video_encoder_verbatim.h"
-#include "remoting/host/client_session.h"
#include "remoting/host/desktop_environment.h"
#include "remoting/host/fake_desktop_environment.h"
#include "remoting/host/fake_host_extension.h"
@@ -179,7 +181,7 @@ void ClientSessionTest::CreateClientSession() {
// Mock protocol::ConnectionToClient APIs called directly by ClientSession.
// HostStub is not touched by ClientSession, so we can safely pass nullptr.
scoped_ptr<protocol::FakeConnectionToClient> connection(
- new protocol::FakeConnectionToClient(session.Pass()));
+ new protocol::FakeConnectionToClient(std::move(session)));
connection->set_client_stub(&client_stub_);
connection_ = connection.get();
@@ -191,11 +193,8 @@ void ClientSessionTest::CreateClientSession() {
task_runner_, // Encode thread.
task_runner_, // Network thread.
task_runner_, // UI thread.
- connection.Pass(),
- desktop_environment_factory_.get(),
- base::TimeDelta(),
- nullptr,
- extensions_));
+ std::move(connection), desktop_environment_factory_.get(),
+ base::TimeDelta(), nullptr, extensions_));
}
void ClientSessionTest::ConnectClientSession() {
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698