Index: webrtc/p2p/base/tcpport_unittest.cc |
diff --git a/webrtc/p2p/base/tcpport_unittest.cc b/webrtc/p2p/base/tcpport_unittest.cc |
index 5a232021bb4e8750ce7e6d785310ea877cb85cdf..7b354df67355a13f25297a4d3e6fdcd145d3bc0f 100644 |
--- a/webrtc/p2p/base/tcpport_unittest.cc |
+++ b/webrtc/p2p/base/tcpport_unittest.cc |
@@ -31,10 +31,9 @@ static const SocketAddress kRemoteAddr("22.22.22.22", 2); |
class TCPPortTest : public testing::Test, public sigslot::has_slots<> { |
public: |
TCPPortTest() |
- : main_(rtc::Thread::Current()), |
- pss_(new rtc::PhysicalSocketServer), |
+ : pss_(new rtc::PhysicalSocketServer), |
ss_(new rtc::VirtualSocketServer(pss_.get())), |
- ss_scope_(ss_.get()), |
+ main_(ss_.get()), |
network_("unittest", "unittest", rtc::IPAddress(INADDR_ANY), 32), |
socket_factory_(rtc::Thread::Current()), |
username_(rtc::CreateRandomString(ICE_UFRAG_LENGTH)), |
@@ -59,15 +58,14 @@ class TCPPortTest : public testing::Test, public sigslot::has_slots<> { |
} |
TCPPort* CreateTCPPort(const SocketAddress& addr) { |
- return TCPPort::Create(main_, &socket_factory_, &network_, addr.ipaddr(), 0, |
- 0, username_, password_, true); |
+ return TCPPort::Create(&main_, &socket_factory_, &network_, addr.ipaddr(), |
+ 0, 0, username_, password_, true); |
} |
protected: |
- rtc::Thread* main_; |
std::unique_ptr<rtc::PhysicalSocketServer> pss_; |
std::unique_ptr<rtc::VirtualSocketServer> ss_; |
- rtc::SocketServerScope ss_scope_; |
+ rtc::AutoSocketServerThread main_; |
rtc::Network network_; |
rtc::BasicPacketSocketFactory socket_factory_; |
std::string username_; |