In bwe tests Collect receive statistic using GetReportBlocks collector
instead of GetActiveStatistcian

BUG=webrtc:8016

Review-Url: https://codereview.webrtc.org/2996883002
Cr-Original-Commit-Position: refs/heads/master@{#19685}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 7eb938d4c065014a6d33a4258b6e85e28de28359
diff --git a/modules/remote_bitrate_estimator/test/estimators/remb.cc b/modules/remote_bitrate_estimator/test/estimators/remb.cc
index 1daf14e..c3f1dc9 100644
--- a/modules/remote_bitrate_estimator/test/estimators/remb.cc
+++ b/modules/remote_bitrate_estimator/test/estimators/remb.cc
@@ -110,10 +110,14 @@
   uint32_t estimated_bps = 0;
   RembFeedback* feedback = NULL;
   if (LatestEstimate(&estimated_bps)) {
-    StatisticianMap statisticians = recv_stats_->GetActiveStatisticians();
-    RTCPReportBlock report_block;
-    if (!statisticians.empty()) {
-      latest_report_block_ = BuildReportBlock(statisticians.begin()->second);
+    auto report_blocks = recv_stats_->RtcpReportBlocks(1);
+    if (!report_blocks.empty()) {
+      const rtcp::ReportBlock& stat = report_blocks.front();
+      latest_report_block_.fraction_lost = stat.fraction_lost();
+      latest_report_block_.packets_lost = stat.cumulative_lost();
+      latest_report_block_.extended_highest_sequence_number =
+          stat.extended_high_seq_num();
+      latest_report_block_.jitter = stat.jitter();
     }
 
     feedback = new RembFeedback(flow_id_, now_ms * 1000, last_feedback_ms_,
@@ -133,19 +137,6 @@
 void RembReceiver::OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs,
                                            uint32_t bitrate) {}
 
-RTCPReportBlock RembReceiver::BuildReportBlock(
-    StreamStatistician* statistician) {
-  RTCPReportBlock report_block;
-  RtcpStatistics stats;
-  RTC_DCHECK(statistician->GetStatistics(&stats, true));
-  report_block.fraction_lost = stats.fraction_lost;
-  report_block.packets_lost = stats.packets_lost;
-  report_block.extended_highest_sequence_number =
-      stats.extended_highest_sequence_number;
-  report_block.jitter = stats.jitter;
-  return report_block;
-}
-
 bool RembReceiver::LatestEstimate(uint32_t* estimate_bps) {
   if (latest_estimate_bps_ < 0) {
     std::vector<uint32_t> ssrcs;
diff --git a/modules/remote_bitrate_estimator/test/estimators/remb.h b/modules/remote_bitrate_estimator/test/estimators/remb.h
index 841f79e..77086a7 100644
--- a/modules/remote_bitrate_estimator/test/estimators/remb.h
+++ b/modules/remote_bitrate_estimator/test/estimators/remb.h
@@ -66,7 +66,6 @@
                                uint32_t bitrate) override;
 
  private:
-  static RTCPReportBlock BuildReportBlock(StreamStatistician* statistician);
   bool LatestEstimate(uint32_t* estimate_bps);
 
   std::string estimate_log_prefix_;