| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 packet.client_address); | 629 packet.client_address); |
| 630 } | 630 } |
| 631 | 631 |
| 632 void QuicConnectionLogger::OnVersionNegotiationPacket( | 632 void QuicConnectionLogger::OnVersionNegotiationPacket( |
| 633 const QuicVersionNegotiationPacket& packet) { | 633 const QuicVersionNegotiationPacket& packet) { |
| 634 net_log_.AddEvent( | 634 net_log_.AddEvent( |
| 635 NetLog::TYPE_QUIC_SESSION_VERSION_NEGOTIATION_PACKET_RECEIVED, | 635 NetLog::TYPE_QUIC_SESSION_VERSION_NEGOTIATION_PACKET_RECEIVED, |
| 636 base::Bind(&NetLogQuicVersionNegotiationPacketCallback, &packet)); | 636 base::Bind(&NetLogQuicVersionNegotiationPacketCallback, &packet)); |
| 637 } | 637 } |
| 638 | 638 |
| 639 void QuicConnectionLogger::OnRevivedPacket( | |
| 640 const QuicPacketHeader& revived_header, | |
| 641 base::StringPiece payload) { | |
| 642 net_log_.AddEvent( | |
| 643 NetLog::TYPE_QUIC_SESSION_PACKET_HEADER_REVIVED, | |
| 644 base::Bind(&NetLogQuicPacketHeaderCallback, &revived_header)); | |
| 645 } | |
| 646 | |
| 647 void QuicConnectionLogger::OnCryptoHandshakeMessageReceived( | 639 void QuicConnectionLogger::OnCryptoHandshakeMessageReceived( |
| 648 const CryptoHandshakeMessage& message) { | 640 const CryptoHandshakeMessage& message) { |
| 649 net_log_.AddEvent( | 641 net_log_.AddEvent( |
| 650 NetLog::TYPE_QUIC_SESSION_CRYPTO_HANDSHAKE_MESSAGE_RECEIVED, | 642 NetLog::TYPE_QUIC_SESSION_CRYPTO_HANDSHAKE_MESSAGE_RECEIVED, |
| 651 base::Bind(&NetLogQuicCryptoHandshakeMessageCallback, &message)); | 643 base::Bind(&NetLogQuicCryptoHandshakeMessageCallback, &message)); |
| 652 | 644 |
| 653 if (message.tag() == kSHLO) { | 645 if (message.tag() == kSHLO) { |
| 654 StringPiece address; | 646 StringPiece address; |
| 655 QuicSocketAddressCoder decoder; | 647 QuicSocketAddressCoder decoder; |
| 656 if (message.GetStringPiece(kCADR, &address) && | 648 if (message.GetStringPiece(kCADR, &address) && |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 continue; | 863 continue; |
| 872 } | 864 } |
| 873 // Record some overlapping patterns, to get a better picture, since this is | 865 // Record some overlapping patterns, to get a better picture, since this is |
| 874 // not very expensive. | 866 // not very expensive. |
| 875 if (i % 3 == 0) | 867 if (i % 3 == 0) |
| 876 six_packet_histogram->Add(recent_6_mask); | 868 six_packet_histogram->Add(recent_6_mask); |
| 877 } | 869 } |
| 878 } | 870 } |
| 879 | 871 |
| 880 } // namespace net | 872 } // namespace net |
| OLD | NEW |