Remove all aliases to rtc::Thread
Those alias do not save much typing, but may cause conflicts, specially the one in the header
Bug: None
Change-Id: Ifb17f639e528aaff72861ff55dcd7a96a229715d
Reviewed-on: https://webrtc-review.googlesource.com/c/110784
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25628}
diff --git a/p2p/client/basicportallocator_unittest.cc b/p2p/client/basicportallocator_unittest.cc
index 5cb1596..a07569e 100644
--- a/p2p/client/basicportallocator_unittest.cc
+++ b/p2p/client/basicportallocator_unittest.cc
@@ -38,7 +38,6 @@
using rtc::IPAddress;
using rtc::SocketAddress;
-using rtc::Thread;
#define MAYBE_SKIP_IPV4 \
if (!rtc::HasIPv4Enabled()) { \
@@ -147,15 +146,15 @@
// must be called.
nat_factory_(vss_.get(), kNatUdpAddr, kNatTcpAddr),
nat_socket_factory_(new rtc::BasicPacketSocketFactory(&nat_factory_)),
- stun_server_(TestStunServer::Create(Thread::Current(), kStunAddr)),
- relay_server_(Thread::Current(),
+ stun_server_(TestStunServer::Create(rtc::Thread::Current(), kStunAddr)),
+ relay_server_(rtc::Thread::Current(),
kRelayUdpIntAddr,
kRelayUdpExtAddr,
kRelayTcpIntAddr,
kRelayTcpExtAddr,
kRelaySslTcpIntAddr,
kRelaySslTcpExtAddr),
- turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr),
+ turn_server_(rtc::Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr),
candidate_allocation_done_(false) {
ServerAddresses stun_servers;
stun_servers.insert(kStunAddr);
diff --git a/rtc_base/proxy_unittest.cc b/rtc_base/proxy_unittest.cc
index f42039f..0101893 100644
--- a/rtc_base/proxy_unittest.cc
+++ b/rtc_base/proxy_unittest.cc
@@ -18,7 +18,6 @@
#include "rtc_base/virtualsocketserver.h"
using rtc::Socket;
-using rtc::Thread;
using rtc::SocketAddress;
static const SocketAddress kSocksProxyIntAddr("1.2.3.4", 1080);
@@ -49,7 +48,8 @@
socket, kSocksProxyIntAddr, "", rtc::CryptString());
// TODO: IPv6-ize these tests when proxy supports IPv6.
- rtc::TestEchoServer server(Thread::Current(), SocketAddress(INADDR_ANY, 0));
+ rtc::TestEchoServer server(rtc::Thread::Current(),
+ SocketAddress(INADDR_ANY, 0));
std::unique_ptr<rtc::AsyncTCPSocket> packet_socket(
rtc::AsyncTCPSocket::Create(proxy_socket, SocketAddress(INADDR_ANY, 0),
diff --git a/sdk/android/src/jni/androidmediadecoder.cc b/sdk/android/src/jni/androidmediadecoder.cc
index 47ddaac..4df5082 100644
--- a/sdk/android/src/jni/androidmediadecoder.cc
+++ b/sdk/android/src/jni/androidmediadecoder.cc
@@ -35,7 +35,6 @@
#include "third_party/libyuv/include/libyuv/video_common.h"
using rtc::Bind;
-using rtc::Thread;
using rtc::ThreadManager;
namespace webrtc {
namespace jni {
@@ -121,7 +120,7 @@
// State that is constant for the lifetime of this object once the ctor
// returns.
- std::unique_ptr<Thread>
+ std::unique_ptr<rtc::Thread>
codec_thread_; // Thread on which to operate MediaCodec.
ScopedJavaGlobalRef<jobject> j_media_codec_video_decoder_;
@@ -137,7 +136,7 @@
inited_(false),
sw_fallback_required_(false),
use_surface_(use_surface),
- codec_thread_(Thread::Create()),
+ codec_thread_(rtc::Thread::Create()),
j_media_codec_video_decoder_(
jni,
Java_MediaCodecVideoDecoder_Constructor(jni)) {
diff --git a/sdk/android/src/jni/androidmediaencoder.cc b/sdk/android/src/jni/androidmediaencoder.cc
index 9072fde..09b2ccf 100644
--- a/sdk/android/src/jni/androidmediaencoder.cc
+++ b/sdk/android/src/jni/androidmediaencoder.cc
@@ -47,7 +47,6 @@
#include "third_party/libyuv/include/libyuv/video_common.h"
using rtc::Bind;
-using rtc::Thread;
using rtc::ThreadManager;
namespace webrtc {
diff --git a/sdk/android/src/jni/pc/ownedfactoryandthreads.cc b/sdk/android/src/jni/pc/ownedfactoryandthreads.cc
index 9987f25..2d62ea3 100644
--- a/sdk/android/src/jni/pc/ownedfactoryandthreads.cc
+++ b/sdk/android/src/jni/pc/ownedfactoryandthreads.cc
@@ -21,9 +21,9 @@
}
OwnedFactoryAndThreads::OwnedFactoryAndThreads(
- std::unique_ptr<Thread> network_thread,
- std::unique_ptr<Thread> worker_thread,
- std::unique_ptr<Thread> signaling_thread,
+ std::unique_ptr<rtc::Thread> network_thread,
+ std::unique_ptr<rtc::Thread> worker_thread,
+ std::unique_ptr<rtc::Thread> signaling_thread,
rtc::NetworkMonitorFactory* network_monitor_factory,
PeerConnectionFactoryInterface* factory)
: network_thread_(std::move(network_thread)),
diff --git a/sdk/android/src/jni/pc/ownedfactoryandthreads.h b/sdk/android/src/jni/pc/ownedfactoryandthreads.h
index 2ea8570..bacd42d 100644
--- a/sdk/android/src/jni/pc/ownedfactoryandthreads.h
+++ b/sdk/android/src/jni/pc/ownedfactoryandthreads.h
@@ -18,8 +18,6 @@
#include "api/peerconnectioninterface.h"
#include "rtc_base/thread.h"
-using rtc::Thread;
-
namespace webrtc {
namespace jni {
@@ -33,18 +31,18 @@
// single thing for Java to hold and eventually free.
class OwnedFactoryAndThreads {
public:
- OwnedFactoryAndThreads(std::unique_ptr<Thread> network_thread,
- std::unique_ptr<Thread> worker_thread,
- std::unique_ptr<Thread> signaling_thread,
+ OwnedFactoryAndThreads(std::unique_ptr<rtc::Thread> network_thread,
+ std::unique_ptr<rtc::Thread> worker_thread,
+ std::unique_ptr<rtc::Thread> signaling_thread,
rtc::NetworkMonitorFactory* network_monitor_factory,
PeerConnectionFactoryInterface* factory);
~OwnedFactoryAndThreads();
PeerConnectionFactoryInterface* factory() { return factory_; }
- Thread* network_thread() { return network_thread_.get(); }
- Thread* signaling_thread() { return signaling_thread_.get(); }
- Thread* worker_thread() { return worker_thread_.get(); }
+ rtc::Thread* network_thread() { return network_thread_.get(); }
+ rtc::Thread* signaling_thread() { return signaling_thread_.get(); }
+ rtc::Thread* worker_thread() { return worker_thread_.get(); }
rtc::NetworkMonitorFactory* network_monitor_factory() {
return network_monitor_factory_;
}
@@ -52,9 +50,9 @@
void InvokeJavaCallbacksOnFactoryThreads();
private:
- const std::unique_ptr<Thread> network_thread_;
- const std::unique_ptr<Thread> worker_thread_;
- const std::unique_ptr<Thread> signaling_thread_;
+ const std::unique_ptr<rtc::Thread> network_thread_;
+ const std::unique_ptr<rtc::Thread> worker_thread_;
+ const std::unique_ptr<rtc::Thread> signaling_thread_;
rtc::NetworkMonitorFactory* network_monitor_factory_;
PeerConnectionFactoryInterface* factory_; // Const after ctor except dtor.
};