Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: net/quic/quic_connection_logger.h

Issue 418723002: Log the certificate subjects from the server certificate sent via QUIC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef NET_QUIC_QUIC_CONNECTION_LOGGER_H_ 5 #ifndef NET_QUIC_QUIC_CONNECTION_LOGGER_H_
6 #define NET_QUIC_QUIC_CONNECTION_LOGGER_H_ 6 #define NET_QUIC_QUIC_CONNECTION_LOGGER_H_
7 7
8 #include <bitset> 8 #include <bitset>
9 9
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
11 #include "net/base/net_log.h" 11 #include "net/base/net_log.h"
12 #include "net/base/network_change_notifier.h" 12 #include "net/base/network_change_notifier.h"
13 #include "net/quic/quic_connection.h" 13 #include "net/quic/quic_connection.h"
14 #include "net/quic/quic_protocol.h" 14 #include "net/quic/quic_protocol.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 class CryptoHandshakeMessage; 18 class CryptoHandshakeMessage;
19 class CertVerifyResult;
19 20
20 // This class is a debug visitor of a QuicConnection which logs 21 // This class is a debug visitor of a QuicConnection which logs
21 // events to |net_log|. 22 // events to |net_log|.
22 class NET_EXPORT_PRIVATE QuicConnectionLogger 23 class NET_EXPORT_PRIVATE QuicConnectionLogger
23 : public QuicConnectionDebugVisitor { 24 : public QuicConnectionDebugVisitor {
24 public: 25 public:
25 explicit QuicConnectionLogger(const BoundNetLog& net_log); 26 explicit QuicConnectionLogger(const BoundNetLog& net_log);
26 27
27 virtual ~QuicConnectionLogger(); 28 virtual ~QuicConnectionLogger();
28 29
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 65
65 void OnCryptoHandshakeMessageReceived( 66 void OnCryptoHandshakeMessageReceived(
66 const CryptoHandshakeMessage& message); 67 const CryptoHandshakeMessage& message);
67 void OnCryptoHandshakeMessageSent( 68 void OnCryptoHandshakeMessageSent(
68 const CryptoHandshakeMessage& message); 69 const CryptoHandshakeMessage& message);
69 void OnConnectionClosed(QuicErrorCode error, bool from_peer); 70 void OnConnectionClosed(QuicErrorCode error, bool from_peer);
70 void OnSuccessfulVersionNegotiation(const QuicVersion& version); 71 void OnSuccessfulVersionNegotiation(const QuicVersion& version);
71 void UpdateReceivedFrameCounts(QuicStreamId stream_id, 72 void UpdateReceivedFrameCounts(QuicStreamId stream_id,
72 int num_frames_received, 73 int num_frames_received,
73 int num_duplicate_frames_received); 74 int num_duplicate_frames_received);
75 void OnCertificateVerified(const CertVerifyResult& result);
74 76
75 private: 77 private:
76 // Do a factory get for a histogram for recording data, about individual 78 // Do a factory get for a histogram for recording data, about individual
77 // packet sequence numbers, that was gathered in the vectors 79 // packet sequence numbers, that was gathered in the vectors
78 // received_packets_ and received_acks_. |statistic_name| identifies which 80 // received_packets_ and received_acks_. |statistic_name| identifies which
79 // element of data is recorded, and is used to form the histogram name. 81 // element of data is recorded, and is used to form the histogram name.
80 base::HistogramBase* GetPacketSequenceNumberHistogram( 82 base::HistogramBase* GetPacketSequenceNumberHistogram(
81 const char* statistic_name) const; 83 const char* statistic_name) const;
82 // Do a factory get for a histogram to record a 6-packet loss-sequence as a 84 // Do a factory get for a histogram to record a 6-packet loss-sequence as a
83 // sample. The histogram will record the 64 distinct possible combinations. 85 // sample. The histogram will record the 64 distinct possible combinations.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // The available type of connection (WiFi, 3G, etc.) when connection was first 150 // The available type of connection (WiFi, 3G, etc.) when connection was first
149 // used. 151 // used.
150 const char* const connection_description_; 152 const char* const connection_description_;
151 153
152 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); 154 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger);
153 }; 155 };
154 156
155 } // namespace net 157 } // namespace net
156 158
157 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ 159 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698