Index: webrtc/base/virtualsocket_unittest.cc |
diff --git a/webrtc/base/virtualsocket_unittest.cc b/webrtc/base/virtualsocket_unittest.cc |
index 2cd2b5e4de612a65e97eabdafdd81d55c5a8a1fa..bdbf06a0e9340ac727ca9d24cea009b67533d006 100644 |
--- a/webrtc/base/virtualsocket_unittest.cc |
+++ b/webrtc/base/virtualsocket_unittest.cc |
@@ -14,6 +14,8 @@ |
#include <netinet/in.h> |
#endif |
+#include <memory> |
+ |
#include "webrtc/base/arraysize.h" |
#include "webrtc/base/logging.h" |
#include "webrtc/base/gunit.h" |
@@ -63,7 +65,7 @@ struct Sender : public MessageHandler { |
} |
Thread* thread; |
- scoped_ptr<AsyncUDPSocket> socket; |
+ std::unique_ptr<AsyncUDPSocket> socket; |
rtc::PacketOptions options; |
bool done; |
uint32_t rate; // bytes per second |
@@ -123,7 +125,7 @@ struct Receiver : public MessageHandler, public sigslot::has_slots<> { |
} |
Thread* thread; |
- scoped_ptr<AsyncUDPSocket> socket; |
+ std::unique_ptr<AsyncUDPSocket> socket; |
uint32_t bandwidth; |
bool done; |
size_t count; |
@@ -345,11 +347,11 @@ class VirtualSocketServerTest : public testing::Test { |
EmptySocketAddressWithFamily(initial_addr.family()); |
// Create client and server |
- scoped_ptr<AsyncSocket> client(ss_->CreateAsyncSocket(initial_addr.family(), |
- SOCK_STREAM)); |
+ std::unique_ptr<AsyncSocket> client( |
+ ss_->CreateAsyncSocket(initial_addr.family(), SOCK_STREAM)); |
sink.Monitor(client.get()); |
- scoped_ptr<AsyncSocket> server(ss_->CreateAsyncSocket(initial_addr.family(), |
- SOCK_STREAM)); |
+ std::unique_ptr<AsyncSocket> server( |
+ ss_->CreateAsyncSocket(initial_addr.family(), SOCK_STREAM)); |
sink.Monitor(server.get()); |
// Initiate connect |
@@ -406,7 +408,7 @@ class VirtualSocketServerTest : public testing::Test { |
// Server accepts connection |
EXPECT_TRUE(sink.Check(server.get(), testing::SSE_READ)); |
- scoped_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); |
+ std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); |
ASSERT_TRUE(NULL != accepted.get()); |
sink.Monitor(accepted.get()); |
@@ -435,9 +437,8 @@ class VirtualSocketServerTest : public testing::Test { |
a->Bind(initial_addr); |
EXPECT_EQ(a->GetLocalAddress().family(), initial_addr.family()); |
- |
- scoped_ptr<AsyncSocket> b(ss_->CreateAsyncSocket(initial_addr.family(), |
- SOCK_STREAM)); |
+ std::unique_ptr<AsyncSocket> b( |
+ ss_->CreateAsyncSocket(initial_addr.family(), SOCK_STREAM)); |
sink.Monitor(b.get()); |
b->Bind(initial_addr); |
EXPECT_EQ(b->GetLocalAddress().family(), initial_addr.family()); |