| 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // MtuDiscoveryFrame is PingFrame on wire, it does not have any payload. | 404 // MtuDiscoveryFrame is PingFrame on wire, it does not have any payload. |
| 405 net_log_.AddEvent(NetLogEventType::QUIC_SESSION_MTU_DISCOVERY_FRAME_SENT); | 405 net_log_.AddEvent(NetLogEventType::QUIC_SESSION_MTU_DISCOVERY_FRAME_SENT); |
| 406 break; | 406 break; |
| 407 default: | 407 default: |
| 408 DCHECK(false) << "Illegal frame type: " << frame.type; | 408 DCHECK(false) << "Illegal frame type: " << frame.type; |
| 409 } | 409 } |
| 410 } | 410 } |
| 411 | 411 |
| 412 void QuicConnectionLogger::OnPacketSent( | 412 void QuicConnectionLogger::OnPacketSent( |
| 413 const SerializedPacket& serialized_packet, | 413 const SerializedPacket& serialized_packet, |
| 414 QuicPathId /* original_path_id */, | |
| 415 QuicPacketNumber original_packet_number, | 414 QuicPacketNumber original_packet_number, |
| 416 TransmissionType transmission_type, | 415 TransmissionType transmission_type, |
| 417 QuicTime sent_time) { | 416 QuicTime sent_time) { |
| 418 if (original_packet_number == 0) { | 417 if (original_packet_number == 0) { |
| 419 net_log_.AddEvent( | 418 net_log_.AddEvent( |
| 420 NetLogEventType::QUIC_SESSION_PACKET_SENT, | 419 NetLogEventType::QUIC_SESSION_PACKET_SENT, |
| 421 base::Bind(&NetLogQuicPacketSentCallback, serialized_packet, | 420 base::Bind(&NetLogQuicPacketSentCallback, serialized_packet, |
| 422 transmission_type, sent_time)); | 421 transmission_type, sent_time)); |
| 423 } else { | 422 } else { |
| 424 net_log_.AddEvent( | 423 net_log_.AddEvent( |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 | 704 |
| 706 string prefix("Net.QuicSession.PacketLossRate_"); | 705 string prefix("Net.QuicSession.PacketLossRate_"); |
| 707 base::HistogramBase* histogram = base::Histogram::FactoryGet( | 706 base::HistogramBase* histogram = base::Histogram::FactoryGet( |
| 708 prefix + connection_description_, 1, 1000, 75, | 707 prefix + connection_description_, 1, 1000, 75, |
| 709 base::HistogramBase::kUmaTargetedHistogramFlag); | 708 base::HistogramBase::kUmaTargetedHistogramFlag); |
| 710 histogram->Add(static_cast<base::HistogramBase::Sample>( | 709 histogram->Add(static_cast<base::HistogramBase::Sample>( |
| 711 ReceivedPacketLossRate() * 1000)); | 710 ReceivedPacketLossRate() * 1000)); |
| 712 } | 711 } |
| 713 | 712 |
| 714 } // namespace net | 713 } // namespace net |
| OLD | NEW |