Revert of Make the default ctor of rtc::Thread, protected (patchset #3 id:40001 of https://codereview.webrtc.org/2981623002/ )
Reason for revert:
Break projects.
Original issue's description:
> Make the default ctor of rtc::Thread, protected.
> The goal is to force use of Thread::Create or Thread::CreateWithSocketServer.
>
> The default constructor constructs a 'default' socket server, which is usually a 'physical' socket server, but not always. Not every instance of Thread actually needs to have network support, so it's better to have this be explicit instead of unknowingly instantiate one.
>
> BUG=none
>
> Review-Url: https://codereview.webrtc.org/2981623002
> Cr-Commit-Position: refs/heads/master@{#19001}
> Committed: https://chromium.googlesource.com/external/webrtc/+/a8a351599788f346a2265cfcd3da9a06f577de7f
TBR=kthelgason@webrtc.org,tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=none
Review-Url: https://codereview.webrtc.org/2979963002
Cr-Commit-Position: refs/heads/master@{#19003}
diff --git a/webrtc/rtc_base/nullsocketserver_unittest.cc b/webrtc/rtc_base/nullsocketserver_unittest.cc
index 5538322..5908d32 100644
--- a/webrtc/rtc_base/nullsocketserver_unittest.cc
+++ b/webrtc/rtc_base/nullsocketserver_unittest.cc
@@ -28,9 +28,9 @@
};
TEST_F(NullSocketServerTest, WaitAndSet) {
- auto thread = Thread::Create();
- EXPECT_TRUE(thread->Start());
- thread->Post(RTC_FROM_HERE, this, 0);
+ Thread thread;
+ EXPECT_TRUE(thread.Start());
+ thread.Post(RTC_FROM_HERE, this, 0);
// The process_io will be ignored.
const bool process_io = true;
EXPECT_TRUE_WAIT(ss_.Wait(SocketServer::kForever, process_io), kTimeout);