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

Unified Diff: net/quic/congestion_control/hybrid_slow_start.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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: net/quic/congestion_control/hybrid_slow_start.cc
diff --git a/net/quic/congestion_control/hybrid_slow_start.cc b/net/quic/congestion_control/hybrid_slow_start.cc
index 2ae3b5032656dfccd0455d33231f0db908505eb7..5898ed5e81d55ed4746e21ad76a83e4238aba209 100644
--- a/net/quic/congestion_control/hybrid_slow_start.cc
+++ b/net/quic/congestion_control/hybrid_slow_start.cc
@@ -34,7 +34,8 @@ HybridSlowStart::HybridSlowStart(const QuicClock* clock)
}
void HybridSlowStart::OnPacketAcked(
- QuicPacketSequenceNumber acked_sequence_number, bool in_slow_start) {
+ QuicPacketSequenceNumber acked_sequence_number,
+ bool in_slow_start) {
// OnPacketAcked gets invoked after ShouldExitSlowStart, so it's best to end
// the round when the final packet of the burst is received and start it on
// the next incoming ack.
@@ -90,10 +91,10 @@ bool HybridSlowStart::ShouldExitSlowStart(QuicTime::Delta latest_rtt,
// TODO(ianswett): Pacing or other cases could be handled by checking the send
// time of the first acked packet in a receive round.
if (current_time.Subtract(last_close_ack_pair_time_).ToMicroseconds() <=
- kHybridStartDelayMinThresholdUs) {
+ kHybridStartDelayMinThresholdUs) {
last_close_ack_pair_time_ = current_time;
if (current_time.Subtract(round_start_).ToMicroseconds() >=
- min_rtt.ToMicroseconds() >> 1) {
+ min_rtt.ToMicroseconds() >> 1) {
hystart_found_ = ACK_TRAIN;
}
} else if (last_close_ack_pair_time_ == round_start_) {
@@ -116,23 +117,23 @@ bool HybridSlowStart::ShouldExitSlowStart(QuicTime::Delta latest_rtt,
// We only need to check this once per round.
if (rtt_sample_count_ == kHybridStartMinSamples) {
// Divide min_rtt by 16 to get a rtt increase threshold for exiting.
- int min_rtt_increase_threshold_us = min_rtt.ToMicroseconds() >>
- kHybridStartDelayFactorExp;
+ int min_rtt_increase_threshold_us =
+ min_rtt.ToMicroseconds() >> kHybridStartDelayFactorExp;
// Ensure the rtt threshold is never less than 2ms or more than 16ms.
- min_rtt_increase_threshold_us = min(min_rtt_increase_threshold_us,
- kHybridStartDelayMaxThresholdUs);
+ min_rtt_increase_threshold_us =
+ min(min_rtt_increase_threshold_us, kHybridStartDelayMaxThresholdUs);
QuicTime::Delta min_rtt_increase_threshold =
QuicTime::Delta::FromMicroseconds(max(min_rtt_increase_threshold_us,
kHybridStartDelayMinThresholdUs));
if (current_min_rtt_ > min_rtt.Add(min_rtt_increase_threshold)) {
- hystart_found_= DELAY;
+ hystart_found_ = DELAY;
}
}
// Exit from slow start if the cwnd is greater than 16 and an ack train or
// increasing delay are found.
return congestion_window >= kHybridStartLowWindow &&
- hystart_found_ != NOT_FOUND;
+ hystart_found_ != NOT_FOUND;
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698