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}
This commit is contained in:
Danil Chapovalov
2018-11-13 18:07:46 +01:00
committed by Commit Bot
parent 428a160dd6
commit 6dbf0e43a5
6 changed files with 19 additions and 24 deletions

View File

@ -38,7 +38,6 @@
using rtc::IPAddress; using rtc::IPAddress;
using rtc::SocketAddress; using rtc::SocketAddress;
using rtc::Thread;
#define MAYBE_SKIP_IPV4 \ #define MAYBE_SKIP_IPV4 \
if (!rtc::HasIPv4Enabled()) { \ if (!rtc::HasIPv4Enabled()) { \
@ -147,15 +146,15 @@ class BasicPortAllocatorTestBase : public testing::Test,
// must be called. // must be called.
nat_factory_(vss_.get(), kNatUdpAddr, kNatTcpAddr), nat_factory_(vss_.get(), kNatUdpAddr, kNatTcpAddr),
nat_socket_factory_(new rtc::BasicPacketSocketFactory(&nat_factory_)), nat_socket_factory_(new rtc::BasicPacketSocketFactory(&nat_factory_)),
stun_server_(TestStunServer::Create(Thread::Current(), kStunAddr)), stun_server_(TestStunServer::Create(rtc::Thread::Current(), kStunAddr)),
relay_server_(Thread::Current(), relay_server_(rtc::Thread::Current(),
kRelayUdpIntAddr, kRelayUdpIntAddr,
kRelayUdpExtAddr, kRelayUdpExtAddr,
kRelayTcpIntAddr, kRelayTcpIntAddr,
kRelayTcpExtAddr, kRelayTcpExtAddr,
kRelaySslTcpIntAddr, kRelaySslTcpIntAddr,
kRelaySslTcpExtAddr), kRelaySslTcpExtAddr),
turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr), turn_server_(rtc::Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr),
candidate_allocation_done_(false) { candidate_allocation_done_(false) {
ServerAddresses stun_servers; ServerAddresses stun_servers;
stun_servers.insert(kStunAddr); stun_servers.insert(kStunAddr);

View File

@ -18,7 +18,6 @@
#include "rtc_base/virtualsocketserver.h" #include "rtc_base/virtualsocketserver.h"
using rtc::Socket; using rtc::Socket;
using rtc::Thread;
using rtc::SocketAddress; using rtc::SocketAddress;
static const SocketAddress kSocksProxyIntAddr("1.2.3.4", 1080); static const SocketAddress kSocksProxyIntAddr("1.2.3.4", 1080);
@ -49,7 +48,8 @@ TEST_F(ProxyTest, TestSocks5Connect) {
socket, kSocksProxyIntAddr, "", rtc::CryptString()); socket, kSocksProxyIntAddr, "", rtc::CryptString());
// TODO: IPv6-ize these tests when proxy supports IPv6. // 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( std::unique_ptr<rtc::AsyncTCPSocket> packet_socket(
rtc::AsyncTCPSocket::Create(proxy_socket, SocketAddress(INADDR_ANY, 0), rtc::AsyncTCPSocket::Create(proxy_socket, SocketAddress(INADDR_ANY, 0),

View File

@ -35,7 +35,6 @@
#include "third_party/libyuv/include/libyuv/video_common.h" #include "third_party/libyuv/include/libyuv/video_common.h"
using rtc::Bind; using rtc::Bind;
using rtc::Thread;
using rtc::ThreadManager; using rtc::ThreadManager;
namespace webrtc { namespace webrtc {
namespace jni { namespace jni {
@ -121,7 +120,7 @@ class MediaCodecVideoDecoder : public VideoDecoder, public rtc::MessageHandler {
// State that is constant for the lifetime of this object once the ctor // State that is constant for the lifetime of this object once the ctor
// returns. // returns.
std::unique_ptr<Thread> std::unique_ptr<rtc::Thread>
codec_thread_; // Thread on which to operate MediaCodec. codec_thread_; // Thread on which to operate MediaCodec.
ScopedJavaGlobalRef<jobject> j_media_codec_video_decoder_; ScopedJavaGlobalRef<jobject> j_media_codec_video_decoder_;
@ -137,7 +136,7 @@ MediaCodecVideoDecoder::MediaCodecVideoDecoder(JNIEnv* jni,
inited_(false), inited_(false),
sw_fallback_required_(false), sw_fallback_required_(false),
use_surface_(use_surface), use_surface_(use_surface),
codec_thread_(Thread::Create()), codec_thread_(rtc::Thread::Create()),
j_media_codec_video_decoder_( j_media_codec_video_decoder_(
jni, jni,
Java_MediaCodecVideoDecoder_Constructor(jni)) { Java_MediaCodecVideoDecoder_Constructor(jni)) {

View File

@ -47,7 +47,6 @@
#include "third_party/libyuv/include/libyuv/video_common.h" #include "third_party/libyuv/include/libyuv/video_common.h"
using rtc::Bind; using rtc::Bind;
using rtc::Thread;
using rtc::ThreadManager; using rtc::ThreadManager;
namespace webrtc { namespace webrtc {

View File

@ -21,9 +21,9 @@ PeerConnectionFactoryInterface* factoryFromJava(jlong j_p) {
} }
OwnedFactoryAndThreads::OwnedFactoryAndThreads( OwnedFactoryAndThreads::OwnedFactoryAndThreads(
std::unique_ptr<Thread> network_thread, std::unique_ptr<rtc::Thread> network_thread,
std::unique_ptr<Thread> worker_thread, std::unique_ptr<rtc::Thread> worker_thread,
std::unique_ptr<Thread> signaling_thread, std::unique_ptr<rtc::Thread> signaling_thread,
rtc::NetworkMonitorFactory* network_monitor_factory, rtc::NetworkMonitorFactory* network_monitor_factory,
PeerConnectionFactoryInterface* factory) PeerConnectionFactoryInterface* factory)
: network_thread_(std::move(network_thread)), : network_thread_(std::move(network_thread)),

View File

@ -18,8 +18,6 @@
#include "api/peerconnectioninterface.h" #include "api/peerconnectioninterface.h"
#include "rtc_base/thread.h" #include "rtc_base/thread.h"
using rtc::Thread;
namespace webrtc { namespace webrtc {
namespace jni { namespace jni {
@ -33,18 +31,18 @@ PeerConnectionFactoryInterface* factoryFromJava(jlong j_p);
// single thing for Java to hold and eventually free. // single thing for Java to hold and eventually free.
class OwnedFactoryAndThreads { class OwnedFactoryAndThreads {
public: public:
OwnedFactoryAndThreads(std::unique_ptr<Thread> network_thread, OwnedFactoryAndThreads(std::unique_ptr<rtc::Thread> network_thread,
std::unique_ptr<Thread> worker_thread, std::unique_ptr<rtc::Thread> worker_thread,
std::unique_ptr<Thread> signaling_thread, std::unique_ptr<rtc::Thread> signaling_thread,
rtc::NetworkMonitorFactory* network_monitor_factory, rtc::NetworkMonitorFactory* network_monitor_factory,
PeerConnectionFactoryInterface* factory); PeerConnectionFactoryInterface* factory);
~OwnedFactoryAndThreads(); ~OwnedFactoryAndThreads();
PeerConnectionFactoryInterface* factory() { return factory_; } PeerConnectionFactoryInterface* factory() { return factory_; }
Thread* network_thread() { return network_thread_.get(); } rtc::Thread* network_thread() { return network_thread_.get(); }
Thread* signaling_thread() { return signaling_thread_.get(); } rtc::Thread* signaling_thread() { return signaling_thread_.get(); }
Thread* worker_thread() { return worker_thread_.get(); } rtc::Thread* worker_thread() { return worker_thread_.get(); }
rtc::NetworkMonitorFactory* network_monitor_factory() { rtc::NetworkMonitorFactory* network_monitor_factory() {
return network_monitor_factory_; return network_monitor_factory_;
} }
@ -52,9 +50,9 @@ class OwnedFactoryAndThreads {
void InvokeJavaCallbacksOnFactoryThreads(); void InvokeJavaCallbacksOnFactoryThreads();
private: private:
const std::unique_ptr<Thread> network_thread_; const std::unique_ptr<rtc::Thread> network_thread_;
const std::unique_ptr<Thread> worker_thread_; const std::unique_ptr<rtc::Thread> worker_thread_;
const std::unique_ptr<Thread> signaling_thread_; const std::unique_ptr<rtc::Thread> signaling_thread_;
rtc::NetworkMonitorFactory* network_monitor_factory_; rtc::NetworkMonitorFactory* network_monitor_factory_;
PeerConnectionFactoryInterface* factory_; // Const after ctor except dtor. PeerConnectionFactoryInterface* factory_; // Const after ctor except dtor.
}; };