OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/congestion_control/quic_congestion_manager.h" | 5 #include "net/quic/congestion_control/quic_congestion_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 QuicCongestionManager::~QuicCongestionManager() { | 68 QuicCongestionManager::~QuicCongestionManager() { |
69 STLDeleteValues(&packet_history_map_); | 69 STLDeleteValues(&packet_history_map_); |
70 } | 70 } |
71 | 71 |
72 void QuicCongestionManager::SetFromConfig(const QuicConfig& config, | 72 void QuicCongestionManager::SetFromConfig(const QuicConfig& config, |
73 bool is_server) { | 73 bool is_server) { |
74 if (config.initial_round_trip_time_us() > 0 && | 74 if (config.initial_round_trip_time_us() > 0 && |
75 rtt_sample_.IsInfinite()) { | 75 rtt_sample_.IsInfinite()) { |
76 // The initial rtt should already be set on the client side. | 76 // The initial rtt should already be set on the client side. |
77 DLOG_IF(INFO, !is_server) | 77 DVLOG_IF(0, !is_server) |
78 << "Client did not set an initial RTT, but did negotiate one."; | 78 << "Client did not set an initial RTT, but did negotiate one."; |
79 rtt_sample_ = | 79 rtt_sample_ = |
80 QuicTime::Delta::FromMicroseconds(config.initial_round_trip_time_us()); | 80 QuicTime::Delta::FromMicroseconds(config.initial_round_trip_time_us()); |
81 } | 81 } |
82 if (config.congestion_control() == kPACE) { | 82 if (config.congestion_control() == kPACE) { |
83 MaybeEnablePacing(); | 83 MaybeEnablePacing(); |
84 } | 84 } |
85 send_algorithm_->SetFromConfig(config, is_server); | 85 send_algorithm_->SetFromConfig(config, is_server); |
86 } | 86 } |
87 | 87 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 return; | 345 return; |
346 } | 346 } |
347 | 347 |
348 using_pacing_ = true; | 348 using_pacing_ = true; |
349 send_algorithm_.reset( | 349 send_algorithm_.reset( |
350 new PacingSender(send_algorithm_.release(), | 350 new PacingSender(send_algorithm_.release(), |
351 QuicTime::Delta::FromMicroseconds(1))); | 351 QuicTime::Delta::FromMicroseconds(1))); |
352 } | 352 } |
353 | 353 |
354 } // namespace net | 354 } // namespace net |
OLD | NEW |