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

Unified Diff: webrtc/base/virtualsocket_unittest.cc

Issue 1920043002: Replace scoped_ptr with unique_ptr in webrtc/base/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased 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 | « webrtc/base/thread_unittest.cc ('k') | webrtc/base/virtualsocketserver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « webrtc/base/thread_unittest.cc ('k') | webrtc/base/virtualsocketserver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698