Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -430,7 +430,7 @@ NetworkControlUpdate BbrNetworkController::OnTransportPacketsFeedback(
|
||||
} else {
|
||||
bytes_acked_since_queue_drained_ += data_acked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handle logic specific to PROBE_BW mode.
|
||||
|
||||
@ -30,9 +30,8 @@ class RemoteBitrateObserver;
|
||||
class ReceiveSideCongestionController : public CallStatsObserver,
|
||||
public Module {
|
||||
public:
|
||||
ReceiveSideCongestionController(
|
||||
const Clock* clock,
|
||||
PacketRouter* packet_router);
|
||||
ReceiveSideCongestionController(const Clock* clock,
|
||||
PacketRouter* packet_router);
|
||||
|
||||
virtual ~ReceiveSideCongestionController() {}
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ void ProbeController::SetBitrates(int64_t min_bitrate_bps,
|
||||
int64_t max_bitrate_bps) {
|
||||
rtc::CritScope cs(&critsect_);
|
||||
|
||||
if (start_bitrate_bps > 0) {
|
||||
if (start_bitrate_bps > 0) {
|
||||
start_bitrate_bps_ = start_bitrate_bps;
|
||||
estimated_bitrate_bps_ = start_bitrate_bps;
|
||||
} else if (start_bitrate_bps_ == 0) {
|
||||
|
||||
@ -249,7 +249,7 @@ TEST_F(LegacyProbeControllerTest, PeriodicProbingAfterReset) {
|
||||
// Make sure we use |kStartBitrateBps| as the estimated bitrate
|
||||
// until SetEstimatedBitrate is called with an updated estimate.
|
||||
clock_.AdvanceTimeMilliseconds(10000);
|
||||
EXPECT_CALL(local_pacer, CreateProbeCluster(kStartBitrateBps*2));
|
||||
EXPECT_CALL(local_pacer, CreateProbeCluster(kStartBitrateBps * 2));
|
||||
probe_controller_->Process();
|
||||
}
|
||||
|
||||
|
||||
@ -97,10 +97,10 @@ void SortPacketFeedbackVector(
|
||||
}
|
||||
|
||||
bool IsPacerPushbackExperimentEnabled() {
|
||||
return webrtc::field_trial::IsEnabled(kPacerPushbackExperiment) || (
|
||||
!webrtc::field_trial::IsDisabled(kPacerPushbackExperiment) &&
|
||||
webrtc::runtime_enabled_features::IsFeatureEnabled(
|
||||
webrtc::runtime_enabled_features::kDualStreamModeFeatureName));
|
||||
return webrtc::field_trial::IsEnabled(kPacerPushbackExperiment) ||
|
||||
(!webrtc::field_trial::IsDisabled(kPacerPushbackExperiment) &&
|
||||
webrtc::runtime_enabled_features::IsFeatureEnabled(
|
||||
webrtc::runtime_enabled_features::kDualStreamModeFeatureName));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@ -34,7 +34,7 @@ const PacedPacketInfo kPacingInfo1(1, 8, 4000);
|
||||
const PacedPacketInfo kPacingInfo2(2, 14, 7000);
|
||||
const PacedPacketInfo kPacingInfo3(3, 20, 10000);
|
||||
const PacedPacketInfo kPacingInfo4(4, 22, 10000);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
namespace test {
|
||||
|
||||
@ -85,8 +85,7 @@ TEST_F(LegacyTransportFeedbackAdapterTest, ObserverSanity) {
|
||||
const std::vector<PacketFeedback> packets = {
|
||||
PacketFeedback(100, 200, 0, 1000, kPacingInfo0),
|
||||
PacketFeedback(110, 210, 1, 2000, kPacingInfo0),
|
||||
PacketFeedback(120, 220, 2, 3000, kPacingInfo0)
|
||||
};
|
||||
PacketFeedback(120, 220, 2, 3000, kPacingInfo0)};
|
||||
|
||||
rtcp::TransportFeedback feedback;
|
||||
feedback.SetBase(packets[0].sequence_number,
|
||||
@ -171,8 +170,7 @@ TEST_F(LegacyTransportFeedbackAdapterTest, FeedbackVectorReportsUnreceived) {
|
||||
PacketFeedback(130, 230, 3, 1500, kPacingInfo0),
|
||||
PacketFeedback(140, 240, 4, 1500, kPacingInfo0),
|
||||
PacketFeedback(150, 250, 5, 1500, kPacingInfo0),
|
||||
PacketFeedback(160, 260, 6, 1500, kPacingInfo0)
|
||||
};
|
||||
PacketFeedback(160, 260, 6, 1500, kPacingInfo0)};
|
||||
|
||||
for (const PacketFeedback& packet : sent_packets)
|
||||
OnSentPacket(packet);
|
||||
@ -180,8 +178,7 @@ TEST_F(LegacyTransportFeedbackAdapterTest, FeedbackVectorReportsUnreceived) {
|
||||
// Note: Important to include the last packet, as only unreceived packets in
|
||||
// between received packets can be inferred.
|
||||
std::vector<PacketFeedback> received_packets = {
|
||||
sent_packets[0], sent_packets[2], sent_packets[6]
|
||||
};
|
||||
sent_packets[0], sent_packets[2], sent_packets[6]};
|
||||
|
||||
rtcp::TransportFeedback feedback;
|
||||
feedback.SetBase(received_packets[0].sequence_number,
|
||||
|
||||
Reference in New Issue
Block a user