peerconnection: remove old helper function

the TODO is obsolete, that code is only supported in plan-b mode and is a
one-liner.

BUG=webrtc:7600

Change-Id: I4e6c52c3a5b4cfff1b2d9185dedc786df9f474a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179066
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#31701}
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc
index 60d6b16..877f100 100644
--- a/pc/peer_connection.cc
+++ b/pc/peer_connection.cc
@@ -4810,8 +4810,8 @@
     const PeerConnectionInterface::RTCOfferAnswerOptions& offer_answer_options,
     cricket::MediaSessionOptions* session_options) {
   // Figure out transceiver directional preferences.
-  bool send_audio = HasRtpSender(cricket::MEDIA_TYPE_AUDIO);
-  bool send_video = HasRtpSender(cricket::MEDIA_TYPE_VIDEO);
+  bool send_audio = !GetAudioTransceiver()->internal()->senders().empty();
+  bool send_video = !GetVideoTransceiver()->internal()->senders().empty();
 
   // By default, generate sendrecv/recvonly m= sections.
   bool recv_audio = true;
@@ -5112,8 +5112,8 @@
     const PeerConnectionInterface::RTCOfferAnswerOptions& offer_answer_options,
     cricket::MediaSessionOptions* session_options) {
   // Figure out transceiver directional preferences.
-  bool send_audio = HasRtpSender(cricket::MEDIA_TYPE_AUDIO);
-  bool send_video = HasRtpSender(cricket::MEDIA_TYPE_VIDEO);
+  bool send_audio = !GetAudioTransceiver()->internal()->senders().empty();
+  bool send_video = !GetVideoTransceiver()->internal()->senders().empty();
 
   // By default, generate sendrecv/recvonly m= sections. The direction is also
   // restricted by the direction in the offer.
@@ -5576,21 +5576,6 @@
   return nullptr;
 }
 
-// TODO(bugs.webrtc.org/7600): Remove this when multiple transceivers with
-// individual transceiver directions are supported.
-bool PeerConnection::HasRtpSender(cricket::MediaType type) const {
-  switch (type) {
-    case cricket::MEDIA_TYPE_AUDIO:
-      return !GetAudioTransceiver()->internal()->senders().empty();
-    case cricket::MEDIA_TYPE_VIDEO:
-      return !GetVideoTransceiver()->internal()->senders().empty();
-    case cricket::MEDIA_TYPE_DATA:
-      return false;
-  }
-  RTC_NOTREACHED();
-  return false;
-}
-
 rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>
 PeerConnection::FindSenderForTrack(MediaStreamTrackInterface* track) const {
   for (const auto& transceiver : transceivers_) {