From c3a486c41e682cce943f2b20fe987c9421d4b631 Mon Sep 17 00:00:00 2001 From: Lahiru Ginnaliya Gamathige Date: Tue, 9 Feb 2021 00:31:39 -0800 Subject: [PATCH] Delete unused sigslot variables. - Usage of these sigslots are removed in previous changes in WebRTC and downstream repositories. - Remove one more usage of the variables in port_unnittests. No-Try: True Bug: webrtc:11943 Change-Id: Ia424f598248a5d9a0cf88f041641a3dd8aa6effe Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206500 Commit-Queue: Mirko Bonadei Reviewed-by: Mirko Bonadei Reviewed-by: Harald Alvestrand Cr-Commit-Position: refs/heads/master@{#33205} --- p2p/base/dtls_transport.cc | 2 -- p2p/base/dtls_transport_internal.h | 1 - p2p/base/port.cc | 1 - p2p/base/port_interface.h | 1 - p2p/base/port_unittest.cc | 3 ++- 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/p2p/base/dtls_transport.cc b/p2p/base/dtls_transport.cc index b1fb162c0c..4dadcf2517 100644 --- a/p2p/base/dtls_transport.cc +++ b/p2p/base/dtls_transport.cc @@ -820,8 +820,6 @@ void DtlsTransport::set_dtls_state(DtlsTransportState state) { } void DtlsTransport::OnDtlsHandshakeError(rtc::SSLHandshakeError error) { - // Keep the old signaling for downstream usage. - SignalDtlsHandshakeError(error); SendDtlsHandshakeError(error); } diff --git a/p2p/base/dtls_transport_internal.h b/p2p/base/dtls_transport_internal.h index a85d7d2569..34f7a1a7fa 100644 --- a/p2p/base/dtls_transport_internal.h +++ b/p2p/base/dtls_transport_internal.h @@ -117,7 +117,6 @@ class DtlsTransportInternal : public rtc::PacketTransportInternal { sigslot::signal2 SignalDtlsState; // Emitted whenever the Dtls handshake failed on some transport channel. - sigslot::signal1 SignalDtlsHandshakeError; // F: void(rtc::SSLHandshakeError) template void SubscribeDtlsHandshakeError(F&& callback) { diff --git a/p2p/base/port.cc b/p2p/base/port.cc index d5ba2b10e0..436da59f5b 100644 --- a/p2p/base/port.cc +++ b/p2p/base/port.cc @@ -921,7 +921,6 @@ void Port::OnConnectionDestroyed(Connection* conn) { void Port::Destroy() { RTC_DCHECK(connections_.empty()); RTC_LOG(LS_INFO) << ToString() << ": Port deleted"; - SignalDestroyed(this); SendPortDestroyed(this); delete this; } diff --git a/p2p/base/port_interface.h b/p2p/base/port_interface.h index b903b5afbe..73c8e36c78 100644 --- a/p2p/base/port_interface.h +++ b/p2p/base/port_interface.h @@ -114,7 +114,6 @@ class PortInterface { // Signaled when this port decides to delete itself because it no longer has // any usefulness. - sigslot::signal1 SignalDestroyed; virtual void SubscribePortDestroyed( std::function callback) = 0; diff --git a/p2p/base/port_unittest.cc b/p2p/base/port_unittest.cc index c28ae93213..bb5bfbdcd3 100644 --- a/p2p/base/port_unittest.cc +++ b/p2p/base/port_unittest.cc @@ -778,7 +778,8 @@ class PortTest : public ::testing::Test, public sigslot::has_slots<> { bool role_conflict() const { return role_conflict_; } void ConnectToSignalDestroyed(PortInterface* port) { - port->SignalDestroyed.connect(this, &PortTest::OnDestroyed); + port->SubscribePortDestroyed( + [this](PortInterface* port) { OnDestroyed(port); }); } void OnDestroyed(PortInterface* port) { ++ports_destroyed_; }