| Index: net/quic/quic_connection_logger.cc
|
| diff --git a/net/quic/quic_connection_logger.cc b/net/quic/quic_connection_logger.cc
|
| index 4fbe6a4e28d2fc0cc87bd97c15718cff5e94aca3..264bfd6ce3ef158e077328881923ebcf0d519706 100644
|
| --- a/net/quic/quic_connection_logger.cc
|
| +++ b/net/quic/quic_connection_logger.cc
|
| @@ -15,6 +15,7 @@
|
| #include "base/values.h"
|
| #include "net/base/net_log.h"
|
| #include "net/base/net_util.h"
|
| +#include "net/cert/x509_certificate.h"
|
| #include "net/quic/crypto/crypto_handshake_message.h"
|
| #include "net/quic/crypto/crypto_protocol.h"
|
| #include "net/quic/quic_address_mismatch.h"
|
| @@ -239,6 +240,21 @@ base::Value* NetLogQuicOnConnectionClosedCallback(
|
| return dict;
|
| }
|
|
|
| +base::Value* NetLogQuicCertificateVerifiedCallback(
|
| + scoped_refptr<X509Certificate> cert,
|
| + NetLog::LogLevel /* log_level */) {
|
| + std::vector<std::string> dns_names;
|
| + cert->GetDNSNames(&dns_names);
|
| + base::DictionaryValue* dict = new base::DictionaryValue();
|
| + base::ListValue* cert_subjects = new base::ListValue();
|
| + for (std::vector<std::string>::const_iterator it = dns_names.begin();
|
| + it != dns_names.end(); it++) {
|
| + cert_subjects->Append(new base::StringValue(*it));
|
| + }
|
| + dict->Set("cert_subjects", cert_subjects);
|
| + return dict;
|
| +}
|
| +
|
| void UpdatePacketGapSentHistogram(size_t num_consecutive_missing_packets) {
|
| UMA_HISTOGRAM_COUNTS("Net.QuicSession.PacketGapSent",
|
| num_consecutive_missing_packets);
|
| @@ -672,6 +688,13 @@ void QuicConnectionLogger::UpdateReceivedFrameCounts(
|
| }
|
| }
|
|
|
| +void QuicConnectionLogger::OnCertificateVerified(
|
| + scoped_refptr<X509Certificate> cert) {
|
| + net_log_.AddEvent(
|
| + NetLog::TYPE_QUIC_SESSION_CERTIFICATE_VERIFIED,
|
| + base::Bind(&NetLogQuicCertificateVerifiedCallback, cert));
|
| +}
|
| +
|
| base::HistogramBase* QuicConnectionLogger::GetPacketSequenceNumberHistogram(
|
| const char* statistic_name) const {
|
| string prefix("Net.QuicSession.PacketReceived_");
|
|
|