summaryrefslogtreecommitdiff
path: root/chromium/net/quic/quic_connection_logger.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/net/quic/quic_connection_logger.cc')
-rw-r--r--chromium/net/quic/quic_connection_logger.cc30
1 files changed, 28 insertions, 2 deletions
diff --git a/chromium/net/quic/quic_connection_logger.cc b/chromium/net/quic/quic_connection_logger.cc
index 1293fac42ac..71803309b69 100644
--- a/chromium/net/quic/quic_connection_logger.cc
+++ b/chromium/net/quic/quic_connection_logger.cc
@@ -227,6 +227,14 @@ base::Value NetLogQuicCryptoHandshakeMessageParams(
return dict;
}
+base::Value NetLogQuicTransportParametersParams(
+ const quic::TransportParameters& transport_parameters) {
+ base::Value dict(base::Value::Type::DICTIONARY);
+ dict.SetStringKey("quic_transport_parameters",
+ transport_parameters.ToString());
+ return dict;
+}
+
base::Value NetLogQuicOnConnectionClosedParams(
quic::QuicErrorCode error,
string error_details,
@@ -877,8 +885,6 @@ void QuicConnectionLogger::OnIncomingAck(
return;
net_log_.AddEvent(NetLogEventType::QUIC_SESSION_ACK_FRAME_RECEIVED,
[&] { return NetLogQuicAckFrameParams(&frame); });
-
- // TODO(rch, rtenneti) sort out histograms for QUIC_VERSION_34 and above.
}
void QuicConnectionLogger::OnStopWaitingFrame(
@@ -1142,6 +1148,26 @@ void QuicConnectionLogger::OnRttChanged(quic::QuicTime::Delta rtt) const {
}
}
+void QuicConnectionLogger::OnTransportParametersSent(
+ const quic::TransportParameters& transport_parameters) {
+ if (!net_log_.IsCapturing())
+ return;
+ net_log_.AddEvent(
+ NetLogEventType::QUIC_SESSION_TRANSPORT_PARAMETERS_SENT, [&] {
+ return NetLogQuicTransportParametersParams(transport_parameters);
+ });
+}
+
+void QuicConnectionLogger::OnTransportParametersReceived(
+ const quic::TransportParameters& transport_parameters) {
+ if (!net_log_.IsCapturing())
+ return;
+ net_log_.AddEvent(
+ NetLogEventType::QUIC_SESSION_TRANSPORT_PARAMETERS_RECEIVED, [&] {
+ return NetLogQuicTransportParametersParams(transport_parameters);
+ });
+}
+
void QuicConnectionLogger::RecordAggregatePacketLossRate() const {
// For short connections under 22 packets in length, we'll rely on the
// Net.QuicSession.21CumulativePacketsReceived_* histogram to indicate packet