diff options
author | sergeyu <sergeyu@chromium.org> | 2015-12-23 11:01:22 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-23 19:02:20 +0000 |
commit | 1417e013d741b99685fee8f3d3c166f597655eda (patch) | |
tree | 6a2ab7f1547bd187cb4eb8e037f8ed69ca36eed1 /remoting/host/client_session_unittest.cc | |
parent | 090488ff3ff55782b02a1b2965bdbe2acd0b8f53 (diff) | |
download | chromium_src-1417e013d741b99685fee8f3d3c166f597655eda.zip chromium_src-1417e013d741b99685fee8f3d3c166f597655eda.tar.gz chromium_src-1417e013d741b99685fee8f3d3c166f597655eda.tar.bz2 |
Use std::move() instead of .Pass() in remoting/host
Now there is a presubmit check that doesn't allow Pass() anymore.
See https://www.chromium.org/rvalue-references for information
about std::move in chromium.
Review URL: https://codereview.chromium.org/1549493004
Cr-Commit-Position: refs/heads/master@{#366759}
Diffstat (limited to 'remoting/host/client_session_unittest.cc')
-rw-r--r-- | remoting/host/client_session_unittest.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc index 45ad65b..dade472 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() { |