Delete method MessageQueue::set_socketserver

Instead, make the pointer to the associated socket server a
construction time const, and delete its lock.

Introduces a helper class AutoSocketServerThread for code
(mainly tests) which need a socket server associated with
the current thread.

BUG=webrtc:7501

Review-Url: https://codereview.webrtc.org/2828223002
Cr-Commit-Position: refs/heads/master@{#18047}
This commit is contained in:
nisse
2017-05-08 05:25:41 -07:00
committed by Commit bot
parent d2690ddfff
commit 7eaa4ea75f
28 changed files with 142 additions and 153 deletions

View File

@ -115,16 +115,15 @@ class PhysicalSocketTest : public SocketTest {
protected:
PhysicalSocketTest()
: server_(new FakePhysicalSocketServer(this)),
scope_(server_.get()),
thread_(server_.get()),
fail_accept_(false),
max_send_size_(-1) {
}
max_send_size_(-1) {}
void ConnectInternalAcceptError(const IPAddress& loopback);
void WritableAfterPartialWrite(const IPAddress& loopback);
std::unique_ptr<FakePhysicalSocketServer> server_;
SocketServerScope scope_;
rtc::AutoSocketServerThread thread_;
bool fail_accept_;
int max_send_size_;
};