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

Unified Diff: remoting/protocol/pseudotcp_channel_factory.cc

Issue 1534193004: Use std::move() instead of scoped_ptr<>::Pass(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: remoting/protocol/pseudotcp_channel_factory.cc
diff --git a/remoting/protocol/pseudotcp_channel_factory.cc b/remoting/protocol/pseudotcp_channel_factory.cc
index 432a2a92967261882dd66c7f48b2b275edc4f07c..5f54a8d41f935ef80fef715464111f7e3e5d4e41 100644
--- a/remoting/protocol/pseudotcp_channel_factory.cc
+++ b/remoting/protocol/pseudotcp_channel_factory.cc
@@ -60,7 +60,7 @@ void PseudoTcpChannelFactory::OnDatagramChannelCreated(
const std::string& name,
const ChannelCreatedCallback& callback,
scoped_ptr<P2PDatagramSocket> datagram_socket) {
- PseudoTcpAdapter* adapter = new PseudoTcpAdapter(datagram_socket.Pass());
+ PseudoTcpAdapter* adapter = new PseudoTcpAdapter(std::move(datagram_socket));
pending_sockets_[name] = adapter;
adapter->SetSendBufferSize(kTcpSendBufferSize);
@@ -92,7 +92,7 @@ void PseudoTcpChannelFactory::OnPseudoTcpConnected(
if (result != net::OK)
socket.reset();
- callback.Run(socket.Pass());
+ callback.Run(std::move(socket));
}
} // namespace protocol

Powered by Google App Engine
This is Rietveld 408576698