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

Unified Diff: webrtc/p2p/client/socketmonitor.cc

Issue 2396513003: Restore thread name consistency for webrtc/p2p/ . (Closed)
Patch Set: Explicit call rtc::Thread::CreateWithSocketServer() for unit test. Created 4 years, 2 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
« no previous file with comments | « webrtc/p2p/client/socketmonitor.h ('k') | webrtc/p2p/quic/quictransportchannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/client/socketmonitor.cc
diff --git a/webrtc/p2p/client/socketmonitor.cc b/webrtc/p2p/client/socketmonitor.cc
index 7975514d7e21d314a802eb2f03492cb705b59213..7d553b93f62f22c3f49520f4c237e7ef0c23c024 100644
--- a/webrtc/p2p/client/socketmonitor.cc
+++ b/webrtc/p2p/client/socketmonitor.cc
@@ -22,16 +22,16 @@ enum {
};
ConnectionMonitor::ConnectionMonitor(ConnectionStatsGetter* stats_getter,
- rtc::Thread* worker_thread,
+ rtc::Thread* network_thread,
rtc::Thread* monitoring_thread) {
stats_getter_ = stats_getter;
- worker_thread_ = worker_thread;
+ network_thread_ = network_thread;
monitoring_thread_ = monitoring_thread;
monitoring_ = false;
}
ConnectionMonitor::~ConnectionMonitor() {
- worker_thread_->Clear(this);
+ network_thread_->Clear(this);
monitoring_thread_->Clear(this);
}
@@ -39,18 +39,18 @@ void ConnectionMonitor::Start(int milliseconds) {
rate_ = milliseconds;
if (rate_ < 250)
rate_ = 250;
- worker_thread_->Post(RTC_FROM_HERE, this, MSG_MONITOR_START);
+ network_thread_->Post(RTC_FROM_HERE, this, MSG_MONITOR_START);
}
void ConnectionMonitor::Stop() {
- worker_thread_->Post(RTC_FROM_HERE, this, MSG_MONITOR_STOP);
+ network_thread_->Post(RTC_FROM_HERE, this, MSG_MONITOR_STOP);
}
void ConnectionMonitor::OnMessage(rtc::Message *message) {
rtc::CritScope cs(&crit_);
switch (message->message_id) {
case MSG_MONITOR_START:
- ASSERT(rtc::Thread::Current() == worker_thread_);
+ ASSERT(rtc::Thread::Current() == network_thread_);
if (!monitoring_) {
monitoring_ = true;
PollConnectionStats_w();
@@ -58,15 +58,15 @@ void ConnectionMonitor::OnMessage(rtc::Message *message) {
break;
case MSG_MONITOR_STOP:
- ASSERT(rtc::Thread::Current() == worker_thread_);
+ ASSERT(rtc::Thread::Current() == network_thread_);
if (monitoring_) {
monitoring_ = false;
- worker_thread_->Clear(this);
+ network_thread_->Clear(this);
}
break;
case MSG_MONITOR_POLL:
- ASSERT(rtc::Thread::Current() == worker_thread_);
+ ASSERT(rtc::Thread::Current() == network_thread_);
PollConnectionStats_w();
break;
@@ -82,7 +82,7 @@ void ConnectionMonitor::OnMessage(rtc::Message *message) {
}
void ConnectionMonitor::PollConnectionStats_w() {
- ASSERT(rtc::Thread::Current() == worker_thread_);
+ ASSERT(rtc::Thread::Current() == network_thread_);
rtc::CritScope cs(&crit_);
// Gather connection infos
@@ -90,7 +90,7 @@ void ConnectionMonitor::PollConnectionStats_w() {
// Signal the monitoring thread, start another poll timer
monitoring_thread_->Post(RTC_FROM_HERE, this, MSG_MONITOR_SIGNAL);
- worker_thread_->PostDelayed(RTC_FROM_HERE, rate_, this, MSG_MONITOR_POLL);
+ network_thread_->PostDelayed(RTC_FROM_HERE, rate_, this, MSG_MONITOR_POLL);
}
} // namespace cricket
« no previous file with comments | « webrtc/p2p/client/socketmonitor.h ('k') | webrtc/p2p/quic/quictransportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698