Replace one use of sigslot with RoboCaller
The eventual goal is to replace sigslot entirely, but we need to
start small, tread carefully, and evaluate how it works out.
Also add a few more RoboCaller unit tests to cover the types we
now use with RoboCaller.
Change-Id: I9a5814d1668a37546ea484ca88ec9c2be1913d25
Bug: webrtc:11943
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184660
Commit-Queue: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32266}
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc
index 64898e2..2b258cd 100644
--- a/pc/peer_connection.cc
+++ b/pc/peer_connection.cc
@@ -685,8 +685,6 @@
transport_controller_.reset(new JsepTransportController(
signaling_thread(), network_thread(), port_allocator_.get(),
async_resolver_factory_.get(), config));
- transport_controller_->SignalIceConnectionState.connect(
- this, &PeerConnection::OnTransportControllerConnectionState);
transport_controller_->SignalStandardizedIceConnectionState.connect(
this, &PeerConnection::SetStandardizedIceConnectionState);
transport_controller_->SignalConnectionState.connect(
@@ -704,6 +702,12 @@
transport_controller_->SignalIceCandidatePairChanged.connect(
this, &PeerConnection::OnTransportControllerCandidateChanged);
+ transport_controller_->SignalIceConnectionState.AddReceiver(
+ [this](cricket::IceConnectionState s) {
+ RTC_DCHECK_RUN_ON(signaling_thread());
+ OnTransportControllerConnectionState(s);
+ });
+
stats_.reset(new StatsCollector(this));
stats_collector_ = RTCStatsCollector::Create(this);
@@ -3625,7 +3629,6 @@
"Disabled")) {
port_allocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);
}
-
if (configuration.disable_ipv6_on_wifi) {
port_allocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6_ON_WIFI);
RTC_LOG(LS_INFO) << "IPv6 candidates on Wi-Fi are disabled.";