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

Unified Diff: remoting/protocol/ssl_hmac_channel_authenticator.cc

Issue 2253233004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months 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/protocol/pairing_registry_unittest.cc ('k') | remoting/protocol/stream_message_pipe_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 303aea253d1457db7e60352c3c16a0c6080f25dc..e0aa78108b41cdbc9a06289f8ebf976c1c2fabd2 100644
--- a/remoting/protocol/ssl_hmac_channel_authenticator.cc
+++ b/remoting/protocol/ssl_hmac_channel_authenticator.cc
@@ -272,7 +272,7 @@ void SslHmacChannelAuthenticator::SecureAndAuthenticate(
std::unique_ptr<net::SSLServerSocket> server_socket =
server_context_->CreateSSLServerSocket(
- base::WrapUnique(new NetStreamSocketAdapter(std::move(socket))));
+ base::MakeUnique<NetStreamSocketAdapter>(std::move(socket)));
net::SSLServerSocket* raw_server_socket = server_socket.get();
socket_ = std::move(server_socket);
result = raw_server_socket->Handshake(
@@ -308,7 +308,7 @@ void SslHmacChannelAuthenticator::SecureAndAuthenticate(
std::unique_ptr<net::ClientSocketHandle> socket_handle(
new net::ClientSocketHandle);
socket_handle->SetSocket(
- base::WrapUnique(new NetStreamSocketAdapter(std::move(socket))));
+ base::MakeUnique<NetStreamSocketAdapter>(std::move(socket)));
#if defined(OS_NACL)
// net_nacl doesn't include ClientSocketFactory.
@@ -476,8 +476,8 @@ void SslHmacChannelAuthenticator::CheckDone(bool* callback_called) {
*callback_called = true;
base::ResetAndReturn(&done_callback_)
- .Run(net::OK, base::WrapUnique(new P2PStreamSocketAdapter(
- std::move(socket_), std::move(server_context_))));
+ .Run(net::OK, base::MakeUnique<P2PStreamSocketAdapter>(
+ std::move(socket_), std::move(server_context_)));
}
}
« no previous file with comments | « remoting/protocol/pairing_registry_unittest.cc ('k') | remoting/protocol/stream_message_pipe_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698