Adds reporting of bandwidth estimation periods in BBR.

Bug: webrtc:8415
Change-Id: Ia1e8808d0b446653df6f2e3ae9548161bacdac6b
Reviewed-on: https://webrtc-review.googlesource.com/78262
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23380}
diff --git a/modules/congestion_controller/bbr/bbr_network_controller.cc b/modules/congestion_controller/bbr/bbr_network_controller.cc
index 7ca1d14..5067e9b 100644
--- a/modules/congestion_controller/bbr/bbr_network_controller.cc
+++ b/modules/congestion_controller/bbr/bbr_network_controller.cc
@@ -225,9 +225,13 @@
   target_rate_msg.network_estimate.bandwidth = bandwidth;
   target_rate_msg.network_estimate.round_trip_time = rtt;
 
-  // TODO(srte): Fill in fields below with proper values.
+  // TODO(srte): Fill in field below with proper value.
   target_rate_msg.network_estimate.loss_rate_ratio = 0;
-  target_rate_msg.network_estimate.bwe_period = TimeDelta::Zero();
+  // In in PROBE_BW, target bandwidth is expected to vary over the cycle period.
+  // In other modes the is no given period, therefore the same value as in
+  // PROBE_BW is used for consistency.
+  target_rate_msg.network_estimate.bwe_period =
+      rtt * static_cast<int64_t>(kGainCycleLength);
 
   target_rate_msg.target_rate = target_rate;
   target_rate_msg.at_time = at_time;