Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1156)

Unified Diff: webrtc/modules/congestion_controller/congestion_controller_unittest.cc

Issue 2516983004: Move ownership of PacketRouter from CongestionController to Call. (Closed)
Patch Set: Add back packet_router method and 4-argument constructor. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/congestion_controller/congestion_controller_unittest.cc
diff --git a/webrtc/modules/congestion_controller/congestion_controller_unittest.cc b/webrtc/modules/congestion_controller/congestion_controller_unittest.cc
index 42bb5267b2f2bbe8d92aa438cd5bd068847061f5..9b12cf3f83c88972fe88a2809a7fb7af4b835f24 100644
--- a/webrtc/modules/congestion_controller/congestion_controller_unittest.cc
+++ b/webrtc/modules/congestion_controller/congestion_controller_unittest.cc
@@ -37,10 +37,9 @@ class CongestionControllerTest : public ::testing::Test {
void SetUp() override {
pacer_ = new NiceMock<MockPacedSender>();
std::unique_ptr<PacedSender> pacer(pacer_); // Passes ownership.
- std::unique_ptr<PacketRouter> packet_router(new PacketRouter());
controller_.reset(new CongestionController(
&clock_, &observer_, &remote_bitrate_observer_, &event_log_,
- std::move(packet_router), std::move(pacer)));
+ &packet_router_, std::move(pacer)));
bandwidth_observer_.reset(
controller_->GetBitrateController()->CreateRtcpBandwidthObserver());
@@ -57,6 +56,7 @@ class CongestionControllerTest : public ::testing::Test {
NiceMock<MockRemoteBitrateObserver> remote_bitrate_observer_;
NiceMock<MockRtcEventLog> event_log_;
std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_;
+ PacketRouter packet_router_;
std::unique_ptr<CongestionController> controller_;
const uint32_t kInitialBitrateBps = 60000;
};

Powered by Google App Engine
This is Rietveld 408576698