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

Unified Diff: webrtc/p2p/base/p2ptransportchannel_unittest.cc

Issue 2828223002: Delete method MessageQueue::set_socketserver (Closed)
Patch Set: Delete redundant private: Created 3 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
Index: webrtc/p2p/base/p2ptransportchannel_unittest.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel_unittest.cc b/webrtc/p2p/base/p2ptransportchannel_unittest.cc
index e9d4be60f1801987f9722dac81b65a555c127c65..29faac37288c3eef2d61232b48be1b472b9a4fcb 100644
--- a/webrtc/p2p/base/p2ptransportchannel_unittest.cc
+++ b/webrtc/p2p/base/p2ptransportchannel_unittest.cc
@@ -182,14 +182,13 @@ class P2PTransportChannelTestBase : public testing::Test,
public sigslot::has_slots<> {
public:
P2PTransportChannelTestBase()
- : main_(rtc::Thread::Current()),
- pss_(new rtc::PhysicalSocketServer),
+ : pss_(new rtc::PhysicalSocketServer),
vss_(new rtc::VirtualSocketServer(pss_.get())),
nss_(new rtc::NATSocketServer(vss_.get())),
ss_(new rtc::FirewallSocketServer(nss_.get())),
- ss_scope_(ss_.get()),
- stun_server_(TestStunServer::Create(main_, kStunAddr)),
- turn_server_(main_, kTurnUdpIntAddr, kTurnUdpExtAddr),
+ main_(ss_.get()),
+ stun_server_(TestStunServer::Create(&main_, kStunAddr)),
+ turn_server_(&main_, kTurnUdpIntAddr, kTurnUdpExtAddr),
socks_server1_(ss_.get(),
kSocksProxyAddrs[0],
ss_.get(),
@@ -696,8 +695,8 @@ class P2PTransportChannelTestBase : public testing::Test,
GetEndpoint(ch)->saved_candidates_.push_back(
std::unique_ptr<CandidatesData>(new CandidatesData(ch, c)));
} else {
- main_->Post(RTC_FROM_HERE, this, MSG_ADD_CANDIDATES,
- new CandidatesData(ch, c));
+ main_.Post(RTC_FROM_HERE, this, MSG_ADD_CANDIDATES,
+ new CandidatesData(ch, c));
}
}
void OnSelectedCandidatePairChanged(
@@ -726,7 +725,7 @@ class P2PTransportChannelTestBase : public testing::Test,
const std::vector<Candidate>& candidates) {
// Candidate removals are not paused.
CandidatesData* candidates_data = new CandidatesData(ch, candidates);
- main_->Post(RTC_FROM_HERE, this, MSG_REMOVE_CANDIDATES, candidates_data);
+ main_.Post(RTC_FROM_HERE, this, MSG_REMOVE_CANDIDATES, candidates_data);
}
// Tcp candidate verification has to be done when they are generated.
@@ -749,7 +748,7 @@ class P2PTransportChannelTestBase : public testing::Test,
void ResumeCandidates(int endpoint) {
Endpoint* ed = GetEndpoint(endpoint);
for (auto& candidate : ed->saved_candidates_) {
- main_->Post(RTC_FROM_HERE, this, MSG_ADD_CANDIDATES, candidate.release());
+ main_.Post(RTC_FROM_HERE, this, MSG_ADD_CANDIDATES, candidate.release());
}
ed->saved_candidates_.clear();
ed->save_candidates_ = false;
@@ -875,12 +874,11 @@ class P2PTransportChannelTestBase : public testing::Test,
bool nominated() { return nominated_; }
private:
- rtc::Thread* main_;
std::unique_ptr<rtc::PhysicalSocketServer> pss_;
std::unique_ptr<rtc::VirtualSocketServer> vss_;
std::unique_ptr<rtc::NATSocketServer> nss_;
std::unique_ptr<rtc::FirewallSocketServer> ss_;
- rtc::SocketServerScope ss_scope_;
+ rtc::AutoSocketServerThread main_;
std::unique_ptr<TestStunServer> stun_server_;
TestTurnServer turn_server_;
rtc::SocksProxyServer socks_server1_;
@@ -2934,7 +2932,7 @@ class P2PTransportChannelPingTest : public testing::Test,
P2PTransportChannelPingTest()
: pss_(new rtc::PhysicalSocketServer),
vss_(new rtc::VirtualSocketServer(pss_.get())),
- ss_scope_(vss_.get()) {}
+ thread_(vss_.get()) {}
protected:
void PrepareChannel(P2PTransportChannel* ch) {
@@ -3084,7 +3082,7 @@ class P2PTransportChannelPingTest : public testing::Test,
private:
std::unique_ptr<rtc::PhysicalSocketServer> pss_;
std::unique_ptr<rtc::VirtualSocketServer> vss_;
- rtc::SocketServerScope ss_scope_;
+ rtc::AutoSocketServerThread thread_;
CandidatePairInterface* last_selected_candidate_pair_ = nullptr;
int selected_candidate_pair_switches_ = 0;
int last_sent_packet_id_ = -1;

Powered by Google App Engine
This is Rietveld 408576698