Index: remoting/protocol/ssl_hmac_channel_authenticator.cc |
diff --git a/remoting/protocol/ssl_hmac_channel_authenticator.cc b/remoting/protocol/ssl_hmac_channel_authenticator.cc |
index b444adefeace4c55b06d4cb64782b0791a4b04ba..9c38e8aa951684cdf313f05f30989ceded515f07 100644 |
--- a/remoting/protocol/ssl_hmac_channel_authenticator.cc |
+++ b/remoting/protocol/ssl_hmac_channel_authenticator.cc |
@@ -63,7 +63,7 @@ class FailingCertVerifier : public net::CertVerifier { |
class NetStreamSocketAdapter : public net::StreamSocket { |
public: |
NetStreamSocketAdapter(scoped_ptr<P2PStreamSocket> socket) |
- : socket_(socket.Pass()) {} |
+ : socket_(std::move(socket)) {} |
~NetStreamSocketAdapter() override {} |
int Read(net::IOBuffer* buf, int buf_len, |
@@ -147,7 +147,7 @@ class NetStreamSocketAdapter : public net::StreamSocket { |
class P2PStreamSocketAdapter : public P2PStreamSocket { |
public: |
P2PStreamSocketAdapter(scoped_ptr<net::StreamSocket> socket) |
- : socket_(socket.Pass()) {} |
+ : socket_(std::move(socket)) {} |
~P2PStreamSocketAdapter() override {} |
int Read(const scoped_refptr<net::IOBuffer>& buf, int buf_len, |
@@ -173,7 +173,7 @@ SslHmacChannelAuthenticator::CreateForClient( |
scoped_ptr<SslHmacChannelAuthenticator> result( |
new SslHmacChannelAuthenticator(auth_key)); |
result->remote_cert_ = remote_cert; |
- return result.Pass(); |
+ return result; |
} |
scoped_ptr<SslHmacChannelAuthenticator> |
@@ -185,7 +185,7 @@ SslHmacChannelAuthenticator::CreateForHost( |
new SslHmacChannelAuthenticator(auth_key)); |
result->local_cert_ = local_cert; |
result->local_key_pair_ = key_pair; |
- return result.Pass(); |
+ return result; |
} |
SslHmacChannelAuthenticator::SslHmacChannelAuthenticator( |
@@ -224,10 +224,10 @@ void SslHmacChannelAuthenticator::SecureAndAuthenticate( |
ssl_config.require_ecdhe = true; |
scoped_ptr<net::SSLServerSocket> server_socket = net::CreateSSLServerSocket( |
- make_scoped_ptr(new NetStreamSocketAdapter(socket.Pass())), cert.get(), |
- local_key_pair_->private_key(), ssl_config); |
+ make_scoped_ptr(new NetStreamSocketAdapter(std::move(socket))), |
+ cert.get(), local_key_pair_->private_key(), ssl_config); |
net::SSLServerSocket* raw_server_socket = server_socket.get(); |
- socket_ = server_socket.Pass(); |
+ socket_ = std::move(server_socket); |
result = raw_server_socket->Handshake( |
base::Bind(&SslHmacChannelAuthenticator::OnConnected, |
base::Unretained(this))); |
@@ -257,16 +257,16 @@ void SslHmacChannelAuthenticator::SecureAndAuthenticate( |
scoped_ptr<net::ClientSocketHandle> socket_handle( |
new net::ClientSocketHandle); |
socket_handle->SetSocket( |
- make_scoped_ptr(new NetStreamSocketAdapter(socket.Pass()))); |
+ make_scoped_ptr(new NetStreamSocketAdapter(std::move(socket)))); |
#if defined(OS_NACL) |
// net_nacl doesn't include ClientSocketFactory. |
socket_.reset(new net::SSLClientSocketOpenSSL( |
- socket_handle.Pass(), host_and_port, ssl_config, context)); |
+ std::move(socket_handle), host_and_port, ssl_config, context)); |
#else |
socket_ = |
net::ClientSocketFactory::GetDefaultFactory()->CreateSSLClientSocket( |
- socket_handle.Pass(), host_and_port, ssl_config, context); |
+ std::move(socket_handle), host_and_port, ssl_config, context); |
#endif |
result = socket_->Connect( |
@@ -426,7 +426,7 @@ void SslHmacChannelAuthenticator::CheckDone(bool* callback_called) { |
base::ResetAndReturn(&done_callback_) |
.Run(net::OK, |
- make_scoped_ptr(new P2PStreamSocketAdapter(socket_.Pass()))); |
+ make_scoped_ptr(new P2PStreamSocketAdapter(std::move(socket_)))); |
} |
} |