Remove SctpDataChannelControllerInterface::DisconnectDataChannel

Bug: webrtc:11547
Change-Id: Ibc8c64da5289d5cb8c8a777cd0e764f71eb14fa7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297361
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39565}
This commit is contained in:
Tommi 2023-03-15 14:35:39 +01:00 committed by WebRTC LUCI CQ
parent 5136600626
commit df3e4caf77
5 changed files with 2 additions and 20 deletions

View File

@ -46,13 +46,6 @@ bool DataChannelController::ConnectDataChannel(
return data_channel_transport() ? true : false;
}
void DataChannelController::DisconnectDataChannel(
SctpDataChannel* webrtc_data_channel) {
RTC_DCHECK_RUN_ON(signaling_thread());
// TODO(bugs.webrtc.org/11547): This method can be removed once not
// needed by `SctpDataChannel`.
}
void DataChannelController::AddSctpDataStream(int sid) {
if (data_channel_transport()) {
network_thread()->BlockingCall([this, sid] {

View File

@ -52,7 +52,6 @@ class DataChannelController : public SctpDataChannelControllerInterface,
const rtc::CopyOnWriteBuffer& payload,
cricket::SendDataResult* result) override;
bool ConnectDataChannel(SctpDataChannel* webrtc_data_channel) override;
void DisconnectDataChannel(SctpDataChannel* webrtc_data_channel) override;
void AddSctpDataStream(int sid) override;
void RemoveSctpDataStream(int sid) override;
bool ReadyToSendData() const override;

View File

@ -391,7 +391,6 @@ void SctpDataChannel::OnClosingProcedureComplete() {
// all pending data and transitioned to kClosing already.
RTC_DCHECK_EQ(state_, kClosing);
RTC_DCHECK(queued_send_data_.Empty());
SetState(kClosed);
}
@ -608,7 +607,6 @@ void SctpDataChannel::DisconnectFromTransport() {
if (!connected_to_transport_ || !controller_)
return;
controller_->DisconnectDataChannel(this);
connected_to_transport_ = false;
}

View File

@ -47,8 +47,6 @@ class SctpDataChannelControllerInterface {
cricket::SendDataResult* result) = 0;
// Connects to the transport signals.
virtual bool ConnectDataChannel(SctpDataChannel* data_channel) = 0;
// Disconnects from the transport signals.
virtual void DisconnectDataChannel(SctpDataChannel* data_channel) = 0;
// Adds the data channel SID to the transport for SCTP.
virtual void AddSctpDataStream(int sid) = 0;
// Begins the closing procedure by sending an outgoing stream reset. Still

View File

@ -63,13 +63,6 @@ class FakeDataChannelController
return true;
}
void DisconnectDataChannel(webrtc::SctpDataChannel* data_channel) override {
RTC_CHECK(connected_channels_.find(data_channel) !=
connected_channels_.end());
RTC_LOG(LS_VERBOSE) << "DataChannel disconnected " << data_channel;
connected_channels_.erase(data_channel);
}
void AddSctpDataStream(int sid) override {
RTC_CHECK(sid >= 0);
if (!transport_available_) {
@ -90,8 +83,8 @@ class FakeDataChannelController
if (connected_channels_.count(ch) && ch->id() == sid) {
// This path mimics the DCC's OnChannelClosed handler since the FDCC
// (this class) doesn't have a transport that would do that.
DisconnectDataChannel(ch);
ch->OnClosingProcedureComplete();
return;
}
}
}
@ -105,6 +98,7 @@ class FakeDataChannelController
++channels_opened_;
} else if (state == webrtc::DataChannelInterface::DataState::kClosed) {
++channels_closed_;
connected_channels_.erase(data_channel);
}
}