Remove ImplForTesting function from MediaChannel
It is not used any more.
Bug: webrtc:13931
Change-Id: I266de41abe239907c6d65f4b182a8dc3aacaba3d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308022
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40234}
diff --git a/media/base/media_channel.h b/media/base/media_channel.h
index f23df8b..ea6384a 100644
--- a/media/base/media_channel.h
+++ b/media/base/media_channel.h
@@ -255,10 +255,6 @@
// TODO(bugs.webrtc.org/13931): Remove when configuration is more sensible
virtual void SetSendCodecChangedCallback(
absl::AnyInvocable<void()> callback) = 0;
-
- // Get the underlying send/receive implementation channel for testing.
- // TODO(bugs.webrtc.org/13931): Remove method and the fakes that depend on it.
- virtual MediaChannel* ImplForTesting() = 0;
};
class MediaReceiveChannelInterface : public Delayable {
@@ -313,9 +309,6 @@
uint32_t ssrc,
rtc::scoped_refptr<webrtc::FrameTransformerInterface>
frame_transformer) = 0;
- // Get the underlying send/receive implementation channel for testing.
- // TODO(bugs.webrtc.org/13931): Remove method and the fakes that depend on it.
- virtual MediaChannel* ImplForTesting() = 0;
};
// The stats information is structured as follows:
diff --git a/media/base/media_channel_impl.h b/media/base/media_channel_impl.h
index 66c2f3e..33007d0 100644
--- a/media/base/media_channel_impl.h
+++ b/media/base/media_channel_impl.h
@@ -302,10 +302,6 @@
bool HasNetworkInterface() const override {
return MediaChannel::HasNetworkInterface();
}
- MediaChannel* ImplForTesting() override {
- // This class and its subclasses are not interface classes.
- RTC_CHECK_NOTREACHED();
- }
};
// Base class for implementation classes
@@ -379,13 +375,6 @@
bool get_and_clear_legacy_stats) override {
return GetReceiveStats(info, get_and_clear_legacy_stats);
}
-
- private:
- // Functions not implemented on this interface
- MediaChannel* ImplForTesting() override {
- // This class and its subclasses are not interface classes.
- RTC_CHECK_NOTREACHED();
- }
};
} // namespace cricket
diff --git a/media/base/media_channel_shim.h b/media/base/media_channel_shim.h
index 335fae2..e4dbee7 100644
--- a/media/base/media_channel_shim.h
+++ b/media/base/media_channel_shim.h
@@ -83,12 +83,6 @@
}
}
- // Not really valid for this mode
- MediaChannel* ImplForTesting() override {
- RTC_CHECK_NOTREACHED();
- return nullptr;
- }
-
// Implementation of MediaBaseChannelInterface
cricket::MediaType media_type() const override { return MEDIA_TYPE_AUDIO; }
@@ -331,12 +325,6 @@
}
}
- // Not really valid for this mode
- MediaChannel* ImplForTesting() override {
- RTC_CHECK_NOTREACHED();
- return nullptr;
- }
-
// Implementation of MediaBaseChannelInterface
cricket::MediaType media_type() const override { return MEDIA_TYPE_VIDEO; }
diff --git a/media/engine/webrtc_video_engine.h b/media/engine/webrtc_video_engine.h
index 3635c21..e210f04 100644
--- a/media/engine/webrtc_video_engine.h
+++ b/media/engine/webrtc_video_engine.h
@@ -478,11 +478,6 @@
const absl::optional<VideoCodecSettings>& send_codec() const {
return send_codec_;
}
- // Disabled function from interface
- MediaChannel* ImplForTesting() override {
- RTC_CHECK_NOTREACHED();
- return nullptr;
- }
webrtc::TaskQueueBase* const worker_thread_;
webrtc::ScopedTaskSafety task_safety_;
RTC_NO_UNIQUE_ADDRESS webrtc::SequenceChecker network_thread_checker_{
@@ -834,12 +829,6 @@
RTC_DCHECK_RUN_ON(&thread_checker_);
return unsignaled_stream_params_;
}
-
- // Disabled function from API
- MediaChannel* ImplForTesting() override {
- RTC_CHECK_NOTREACHED();
- return nullptr;
- }
// Variables.
webrtc::TaskQueueBase* const worker_thread_;
webrtc::ScopedTaskSafety task_safety_;
diff --git a/media/engine/webrtc_voice_engine.h b/media/engine/webrtc_voice_engine.h
index 327beed..0f7313e 100644
--- a/media/engine/webrtc_voice_engine.h
+++ b/media/engine/webrtc_voice_engine.h
@@ -302,10 +302,6 @@
absl::AnyInvocable<void()> callback) override {
send_codec_changed_callback_ = std::move(callback);
}
- MediaChannel* ImplForTesting() override {
- RTC_CHECK_NOTREACHED();
- return nullptr;
- }
private:
bool SetOptions(const AudioOptions& options);
@@ -458,11 +454,6 @@
void SetReceiveNackEnabled(bool enabled) override;
void SetReceiveNonSenderRttEnabled(bool enabled) override;
- MediaChannel* ImplForTesting() override {
- RTC_CHECK_NOTREACHED();
- return nullptr;
- }
-
private:
bool SetOptions(const AudioOptions& options);
bool SetRecvCodecs(const std::vector<AudioCodec>& codecs);