Reland: Fix race / crash in OnNetworkRouteChanged().
To achieve this some refactoring was done to make it possible to synchronize
access to the DelayBasedBwe in TransportFeedbackAdapter:
- The callback was removed from DelayBasedBwe, it now instead returns its
result.
- TransportFeedbackAdapter was moved to modules/congestion_controller to avoid
unnecessary dependencies.
Reenables previously disabled flaky test. Can no longer reproduce flakiness with gtest-parallel and asan/tsan builds.
BUG=webrtc:6427, webrtc:6422
R=terelius@webrtc.org
Review URL: https://codereview.webrtc.org/2378103005 .
Cr-Commit-Position: refs/heads/master@{#14452}
diff --git a/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc b/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc
index 7da947b..4b298cc 100644
--- a/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc
@@ -169,7 +169,8 @@
EXPECT_EQ(300000, bitrate_observer_.last_bitrate_);
// Test that a low delay-based estimate limits the combined estimate.
- controller_->OnReceiveBitrateChanged({0}, 280000);
+ webrtc::DelayBasedBwe::Result result(false, 280000);
+ controller_->OnDelayBasedBweResult(result);
EXPECT_EQ(280000, bitrate_observer_.last_bitrate_);
// Test that a low REMB limits the combined estimate.