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

Unified Diff: remoting/protocol/pseudotcp_adapter.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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/pseudotcp_adapter.h ('k') | remoting/protocol/pseudotcp_adapter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/pseudotcp_adapter.cc
diff --git a/remoting/protocol/pseudotcp_adapter.cc b/remoting/protocol/pseudotcp_adapter.cc
index 9992ef21d4e171da12406ed18d601b79255bbd90..2ba797ee29de369c981cd562b881980be6aacb3d 100644
--- a/remoting/protocol/pseudotcp_adapter.cc
+++ b/remoting/protocol/pseudotcp_adapter.cc
@@ -32,7 +32,7 @@ namespace protocol {
class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify,
public base::RefCounted<Core> {
public:
- explicit Core(scoped_ptr<P2PDatagramSocket> socket);
+ explicit Core(std::unique_ptr<P2PDatagramSocket> socket);
// Functions used to implement net::StreamSocket.
int Read(const scoped_refptr<net::IOBuffer>& buffer, int buffer_size,
@@ -88,7 +88,7 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify,
net::CompletionCallback write_callback_;
cricket::PseudoTcp pseudo_tcp_;
- scoped_ptr<P2PDatagramSocket> socket_;
+ std::unique_ptr<P2PDatagramSocket> socket_;
scoped_refptr<net::IOBuffer> read_buffer_;
int read_buffer_size_;
@@ -115,8 +115,7 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify,
DISALLOW_COPY_AND_ASSIGN(Core);
};
-
-PseudoTcpAdapter::Core::Core(scoped_ptr<P2PDatagramSocket> socket)
+PseudoTcpAdapter::Core::Core(std::unique_ptr<P2PDatagramSocket> socket)
: pseudo_tcp_(this, 0),
socket_(std::move(socket)),
write_waits_for_send_(false),
@@ -452,9 +451,8 @@ void PseudoTcpAdapter::Core::CheckWriteComplete() {
// Public interface implementation.
-PseudoTcpAdapter::PseudoTcpAdapter(scoped_ptr<P2PDatagramSocket> socket)
- : core_(new Core(std::move(socket))) {
-}
+PseudoTcpAdapter::PseudoTcpAdapter(std::unique_ptr<P2PDatagramSocket> socket)
+ : core_(new Core(std::move(socket))) {}
PseudoTcpAdapter::~PseudoTcpAdapter() {
// Make sure that the underlying socket is destroyed before PseudoTcp.
« no previous file with comments | « remoting/protocol/pseudotcp_adapter.h ('k') | remoting/protocol/pseudotcp_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698