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

Unified Diff: remoting/host/chromoting_host_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/chromoting_host.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host_unittest.cc
diff --git a/remoting/host/chromoting_host_unittest.cc b/remoting/host/chromoting_host_unittest.cc
index de03e60ecb6582281b5f7f0f81c354e583217ad4..fc7719822a9b4b69db4fc9cee2e5b0092c9e96d8 100644
--- a/remoting/host/chromoting_host_unittest.cc
+++ b/remoting/host/chromoting_host_unittest.cc
@@ -2,12 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "remoting/host/chromoting_host.h"
+
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/memory/scoped_ptr.h"
#include "remoting/base/auto_thread_task_runner.h"
#include "remoting/host/audio_capturer.h"
-#include "remoting/host/chromoting_host.h"
#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/fake_desktop_environment.h"
#include "remoting/host/fake_mouse_cursor_monitor.h"
@@ -121,23 +124,19 @@ class ChromotingHostTest : public testing::Test {
// Helper method to pretend a client is connected to ChromotingHost.
void SimulateClientConnection(int connection_index, bool authenticate,
bool reject) {
- scoped_ptr<protocol::ConnectionToClient> connection =
- ((connection_index == 0) ? owned_connection1_ : owned_connection2_)
- .Pass();
+ scoped_ptr<protocol::ConnectionToClient> connection = std::move(
+ (connection_index == 0) ? owned_connection1_ : owned_connection2_);
protocol::ConnectionToClient* connection_ptr = connection.get();
scoped_ptr<ClientSession> client(new ClientSession(
host_.get(),
- task_runner_, // Audio
- task_runner_, // Input
- task_runner_, // Video capture
- task_runner_, // Video encode
- task_runner_, // Network
- task_runner_, // UI
- connection.Pass(),
- desktop_environment_factory_.get(),
- base::TimeDelta(),
- nullptr,
- std::vector<HostExtension*>()));
+ task_runner_, // Audio
+ task_runner_, // Input
+ task_runner_, // Video capture
+ task_runner_, // Video encode
+ task_runner_, // Network
+ task_runner_, // UI
+ std::move(connection), desktop_environment_factory_.get(),
+ base::TimeDelta(), nullptr, std::vector<HostExtension*>()));
ClientSession* client_ptr = client.get();
connection_ptr->set_host_stub(client.get());
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698