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/chromium/quic_connection_logger.h" | 5 #include "net/quic/chromium/quic_connection_logger.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 return address.IsIPv4MappedIPv6() ? ADDRESS_FAMILY_IPV4 | 281 return address.IsIPv4MappedIPv6() ? ADDRESS_FAMILY_IPV4 |
282 : GetAddressFamily(address); | 282 : GetAddressFamily(address); |
283 } | 283 } |
284 | 284 |
285 } // namespace | 285 } // namespace |
286 | 286 |
287 QuicConnectionLogger::QuicConnectionLogger( | 287 QuicConnectionLogger::QuicConnectionLogger( |
288 QuicSpdySession* session, | 288 QuicSpdySession* session, |
289 const char* const connection_description, | 289 const char* const connection_description, |
290 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, | 290 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, |
291 const BoundNetLog& net_log) | 291 const NetLogWithSource& net_log) |
292 : net_log_(net_log), | 292 : net_log_(net_log), |
293 session_(session), | 293 session_(session), |
294 last_received_packet_number_(0), | 294 last_received_packet_number_(0), |
295 last_received_packet_size_(0), | 295 last_received_packet_size_(0), |
296 no_packet_received_after_ping_(false), | 296 no_packet_received_after_ping_(false), |
297 previous_received_packet_size_(0), | 297 previous_received_packet_size_(0), |
298 largest_received_packet_number_(0), | 298 largest_received_packet_number_(0), |
299 largest_received_missing_packet_number_(0), | 299 largest_received_missing_packet_number_(0), |
300 num_out_of_order_received_packets_(0), | 300 num_out_of_order_received_packets_(0), |
301 num_out_of_order_large_received_packets_(0), | 301 num_out_of_order_large_received_packets_(0), |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 | 739 |
740 string prefix("Net.QuicSession.PacketLossRate_"); | 740 string prefix("Net.QuicSession.PacketLossRate_"); |
741 base::HistogramBase* histogram = base::Histogram::FactoryGet( | 741 base::HistogramBase* histogram = base::Histogram::FactoryGet( |
742 prefix + connection_description_, 1, 1000, 75, | 742 prefix + connection_description_, 1, 1000, 75, |
743 base::HistogramBase::kUmaTargetedHistogramFlag); | 743 base::HistogramBase::kUmaTargetedHistogramFlag); |
744 histogram->Add(static_cast<base::HistogramBase::Sample>( | 744 histogram->Add(static_cast<base::HistogramBase::Sample>( |
745 ReceivedPacketLossRate() * 1000)); | 745 ReceivedPacketLossRate() * 1000)); |
746 } | 746 } |
747 | 747 |
748 } // namespace net | 748 } // namespace net |
OLD | NEW |