| 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/quic_connection.h" | 5 #include "net/quic/quic_connection.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 2228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2239 connection_->packet_generator_.FinishBatchOperations(); | 2239 connection_->packet_generator_.FinishBatchOperations(); |
| 2240 } | 2240 } |
| 2241 DCHECK_EQ(already_in_batch_mode_, | 2241 DCHECK_EQ(already_in_batch_mode_, |
| 2242 connection_->packet_generator_.InBatchMode()); | 2242 connection_->packet_generator_.InBatchMode()); |
| 2243 } | 2243 } |
| 2244 | 2244 |
| 2245 QuicConnection::ScopedRetransmissionScheduler::ScopedRetransmissionScheduler( | 2245 QuicConnection::ScopedRetransmissionScheduler::ScopedRetransmissionScheduler( |
| 2246 QuicConnection* connection) | 2246 QuicConnection* connection) |
| 2247 : connection_(connection), | 2247 : connection_(connection), |
| 2248 already_delayed_(connection_->delay_setting_retransmission_alarm_) { | 2248 already_delayed_(connection_->delay_setting_retransmission_alarm_) { |
| 2249 if (FLAGS_quic_delay_retransmission_alarm) { | 2249 if (!FLAGS_quic_delay_retransmission_alarm) { |
| 2250 return; | 2250 return; |
| 2251 } | 2251 } |
| 2252 connection_->delay_setting_retransmission_alarm_ = true; | 2252 connection_->delay_setting_retransmission_alarm_ = true; |
| 2253 } | 2253 } |
| 2254 | 2254 |
| 2255 QuicConnection::ScopedRetransmissionScheduler:: | 2255 QuicConnection::ScopedRetransmissionScheduler:: |
| 2256 ~ScopedRetransmissionScheduler() { | 2256 ~ScopedRetransmissionScheduler() { |
| 2257 if (FLAGS_quic_delay_retransmission_alarm || already_delayed_) { | 2257 if (!FLAGS_quic_delay_retransmission_alarm || already_delayed_) { |
| 2258 return; | 2258 return; |
| 2259 } | 2259 } |
| 2260 connection_->delay_setting_retransmission_alarm_ = false; | 2260 connection_->delay_setting_retransmission_alarm_ = false; |
| 2261 if (connection_->pending_retransmission_alarm_) { | 2261 if (connection_->pending_retransmission_alarm_) { |
| 2262 connection_->SetRetransmissionAlarm(); | 2262 connection_->SetRetransmissionAlarm(); |
| 2263 connection_->pending_retransmission_alarm_ = false; | 2263 connection_->pending_retransmission_alarm_ = false; |
| 2264 } | 2264 } |
| 2265 } | 2265 } |
| 2266 | 2266 |
| 2267 HasRetransmittableData QuicConnection::IsRetransmittable( | 2267 HasRetransmittableData QuicConnection::IsRetransmittable( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2320 sequence_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; | 2320 sequence_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; |
| 2321 ++mtu_probe_count_; | 2321 ++mtu_probe_count_; |
| 2322 | 2322 |
| 2323 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; | 2323 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; |
| 2324 SendMtuDiscoveryPacket(mtu_discovery_target_); | 2324 SendMtuDiscoveryPacket(mtu_discovery_target_); |
| 2325 | 2325 |
| 2326 DCHECK(!mtu_discovery_alarm_->IsSet()); | 2326 DCHECK(!mtu_discovery_alarm_->IsSet()); |
| 2327 } | 2327 } |
| 2328 | 2328 |
| 2329 } // namespace net | 2329 } // namespace net |
| OLD | NEW |