Deprecated the Get BitrateController method

GetBandwidthObserver should be used instead as it exposes a smaller interface.

Bug: webrtc:8415
Change-Id: I29ca795657e205186d7ebd929e756038a294b5f7
Reviewed-on: https://webrtc-review.googlesource.com/23900
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20871}
diff --git a/call/call.cc b/call/call.cc
index 440cd3b..420f8de 100644
--- a/call/call.cc
+++ b/call/call.cc
@@ -912,8 +912,7 @@
   Stats stats;
   // Fetch available send/receive bitrates.
   uint32_t send_bandwidth = 0;
-  transport_send_->send_side_cc()->GetBitrateController()->AvailableBandwidth(
-      &send_bandwidth);
+  transport_send_->send_side_cc()->AvailableBandwidth(&send_bandwidth);
   std::vector<unsigned int> ssrcs;
   uint32_t recv_bandwidth = 0;
   receive_side_cc_.GetRemoteBitrateEstimator(false)->LatestEstimate(
diff --git a/modules/congestion_controller/include/send_side_congestion_controller.h b/modules/congestion_controller/include/send_side_congestion_controller.h
index 5ed5fd4..b33fad0 100644
--- a/modules/congestion_controller/include/send_side_congestion_controller.h
+++ b/modules/congestion_controller/include/send_side_congestion_controller.h
@@ -86,8 +86,12 @@
   virtual void SignalNetworkState(NetworkState state);
   virtual void SetTransportOverhead(size_t transport_overhead_bytes_per_packet);
 
-  virtual BitrateController* GetBitrateController() const;
+  // Deprecated: Use GetBandwidthObserver instead.
+  RTC_DEPRECATED virtual BitrateController* GetBitrateController() const;
+
   virtual RtcpBandwidthObserver* GetBandwidthObserver() const;
+
+  virtual bool AvailableBandwidth(uint32_t* bandwidth) const;
   virtual int64_t GetPacerQueuingDelayMs() const;
   virtual int64_t GetFirstPacketTimeMs() const;
 
diff --git a/modules/congestion_controller/send_side_congestion_controller.cc b/modules/congestion_controller/send_side_congestion_controller.cc
index 4ba0062..ccca692 100644
--- a/modules/congestion_controller/send_side_congestion_controller.cc
+++ b/modules/congestion_controller/send_side_congestion_controller.cc
@@ -212,6 +212,11 @@
   return bitrate_controller_.get();
 }
 
+bool SendSideCongestionController::AvailableBandwidth(
+    uint32_t* bandwidth) const {
+  return bitrate_controller_->AvailableBandwidth(bandwidth);
+}
+
 RtcpBandwidthObserver* SendSideCongestionController::GetBandwidthObserver()
     const {
   return bitrate_controller_.get();