| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_logger.h" | 5 #include "net/quic/quic_connection_logger.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // If |address| is an IPv4-mapped IPv6 address, returns ADDRESS_FAMILY_IPV4 | 274 // If |address| is an IPv4-mapped IPv6 address, returns ADDRESS_FAMILY_IPV4 |
| 275 // instead of ADDRESS_FAMILY_IPV6. Othewise, behaves like GetAddressFamily(). | 275 // instead of ADDRESS_FAMILY_IPV6. Othewise, behaves like GetAddressFamily(). |
| 276 AddressFamily GetRealAddressFamily(const IPAddressNumber& address) { | 276 AddressFamily GetRealAddressFamily(const IPAddressNumber& address) { |
| 277 return IsIPv4Mapped(address) ? ADDRESS_FAMILY_IPV4 : | 277 return IsIPv4Mapped(address) ? ADDRESS_FAMILY_IPV4 : |
| 278 GetAddressFamily(address); | 278 GetAddressFamily(address); |
| 279 } | 279 } |
| 280 | 280 |
| 281 } // namespace | 281 } // namespace |
| 282 | 282 |
| 283 QuicConnectionLogger::QuicConnectionLogger( | 283 QuicConnectionLogger::QuicConnectionLogger( |
| 284 QuicSession* session, | 284 QuicSpdySession* session, |
| 285 const char* const connection_description, | 285 const char* const connection_description, |
| 286 const BoundNetLog& net_log) | 286 const BoundNetLog& net_log) |
| 287 : net_log_(net_log), | 287 : net_log_(net_log), |
| 288 session_(session), | 288 session_(session), |
| 289 last_received_packet_sequence_number_(0), | 289 last_received_packet_sequence_number_(0), |
| 290 last_received_packet_size_(0), | 290 last_received_packet_size_(0), |
| 291 previous_received_packet_size_(0), | 291 previous_received_packet_size_(0), |
| 292 largest_received_packet_sequence_number_(0), | 292 largest_received_packet_sequence_number_(0), |
| 293 largest_received_missing_packet_sequence_number_(0), | 293 largest_received_missing_packet_sequence_number_(0), |
| 294 num_out_of_order_received_packets_(0), | 294 num_out_of_order_received_packets_(0), |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 continue; | 865 continue; |
| 866 } | 866 } |
| 867 // Record some overlapping patterns, to get a better picture, since this is | 867 // Record some overlapping patterns, to get a better picture, since this is |
| 868 // not very expensive. | 868 // not very expensive. |
| 869 if (i % 3 == 0) | 869 if (i % 3 == 0) |
| 870 six_packet_histogram->Add(recent_6_mask); | 870 six_packet_histogram->Add(recent_6_mask); |
| 871 } | 871 } |
| 872 } | 872 } |
| 873 | 873 |
| 874 } // namespace net | 874 } // namespace net |
| OLD | NEW |