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 #include <algorithm> | 9 #include <algorithm> |
10 #include <iterator> | 10 #include <iterator> |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 STLDeleteElements(&undecryptable_packets_); | 256 STLDeleteElements(&undecryptable_packets_); |
257 STLDeleteValues(&group_map_); | 257 STLDeleteValues(&group_map_); |
258 for (QueuedPacketList::iterator it = queued_packets_.begin(); | 258 for (QueuedPacketList::iterator it = queued_packets_.begin(); |
259 it != queued_packets_.end(); ++it) { | 259 it != queued_packets_.end(); ++it) { |
260 delete it->serialized_packet.retransmittable_frames; | 260 delete it->serialized_packet.retransmittable_frames; |
261 delete it->serialized_packet.packet; | 261 delete it->serialized_packet.packet; |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 void QuicConnection::SetFromConfig(const QuicConfig& config) { | 265 void QuicConnection::SetFromConfig(const QuicConfig& config) { |
266 SetIdleNetworkTimeout(config.idle_connection_state_lifetime()); | 266 SetIdleNetworkTimeout(config.IdleConnectionStateLifetime()); |
267 sent_packet_manager_.SetFromConfig(config); | 267 sent_packet_manager_.SetFromConfig(config); |
268 } | 268 } |
269 | 269 |
270 bool QuicConnection::SelectMutualVersion( | 270 bool QuicConnection::SelectMutualVersion( |
271 const QuicVersionVector& available_versions) { | 271 const QuicVersionVector& available_versions) { |
272 // Try to find the highest mutual version by iterating over supported | 272 // Try to find the highest mutual version by iterating over supported |
273 // versions, starting with the highest, and breaking out of the loop once we | 273 // versions, starting with the highest, and breaking out of the loop once we |
274 // find a matching version in the provided available_versions vector. | 274 // find a matching version in the provided available_versions vector. |
275 const QuicVersionVector& supported_versions = framer_.supported_versions(); | 275 const QuicVersionVector& supported_versions = framer_.supported_versions(); |
276 for (size_t i = 0; i < supported_versions.size(); ++i) { | 276 for (size_t i = 0; i < supported_versions.size(); ++i) { |
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2021 } | 2021 } |
2022 for (size_t i = 0; i < retransmittable_frames->frames().size(); ++i) { | 2022 for (size_t i = 0; i < retransmittable_frames->frames().size(); ++i) { |
2023 if (retransmittable_frames->frames()[i].type == CONNECTION_CLOSE_FRAME) { | 2023 if (retransmittable_frames->frames()[i].type == CONNECTION_CLOSE_FRAME) { |
2024 return true; | 2024 return true; |
2025 } | 2025 } |
2026 } | 2026 } |
2027 return false; | 2027 return false; |
2028 } | 2028 } |
2029 | 2029 |
2030 } // namespace net | 2030 } // namespace net |
OLD | NEW |