Index: net/quic/quic_connection_logger.cc |
diff --git a/net/quic/quic_connection_logger.cc b/net/quic/quic_connection_logger.cc |
index bee8b5ccf4359af8767cbcf76514e72c50c6aed8..86f9c6a11737e7cd9e08999109f339ba881fd0f4 100644 |
--- a/net/quic/quic_connection_logger.cc |
+++ b/net/quic/quic_connection_logger.cc |
@@ -195,6 +195,16 @@ base::Value* NetLogQuicBlockedFrameCallback( |
return dict; |
} |
+base::Value* NetLogQuicGoAwayFrameCallback( |
+ const QuicGoAwayFrame* frame, |
+ NetLog::LogLevel /* log_level */) { |
+ base::DictionaryValue* dict = new base::DictionaryValue(); |
+ dict->SetInteger("quic_error", frame->error_code); |
+ dict->SetInteger("last_good_stream_id", frame->last_good_stream_id); |
+ dict->SetString("reason_phrase", frame->reason_phrase); |
+ return dict; |
+} |
+ |
base::Value* NetLogQuicStopWaitingFrameCallback( |
const QuicStopWaitingFrame* frame, |
NetLog::LogLevel /* log_level */) { |
@@ -386,6 +396,10 @@ void QuicConnectionLogger::OnFrameAddedToPacket(const QuicFrame& frame) { |
frame.connection_close_frame)); |
break; |
case GOAWAY_FRAME: |
+ net_log_.AddEvent( |
+ NetLog::TYPE_QUIC_SESSION_GOAWAY_FRAME_SENT, |
+ base::Bind(&NetLogQuicGoAwayFrameCallback, |
+ frame.goaway_frame)); |
break; |
case WINDOW_UPDATE_FRAME: |
net_log_.AddEvent( |
@@ -405,6 +419,10 @@ void QuicConnectionLogger::OnFrameAddedToPacket(const QuicFrame& frame) { |
base::Bind(&NetLogQuicStopWaitingFrameCallback, |
frame.stop_waiting_frame)); |
break; |
+ case PING_FRAME: |
+ // PingFrame has no contents to log, so just record that it was sent. |
+ net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_PING_FRAME_SENT); |
+ break; |
default: |
DCHECK(false) << "Illegal frame type: " << frame.type; |
} |
@@ -578,6 +596,17 @@ void QuicConnectionLogger::OnBlockedFrame(const QuicBlockedFrame& frame) { |
base::Bind(&NetLogQuicBlockedFrameCallback, &frame)); |
} |
+void QuicConnectionLogger::OnGoAwayFrame(const QuicGoAwayFrame& frame) { |
+ net_log_.AddEvent( |
+ NetLog::TYPE_QUIC_SESSION_GOAWAY_FRAME_RECEIVED, |
+ base::Bind(&NetLogQuicGoAwayFrameCallback, &frame)); |
+} |
+ |
+void QuicConnectionLogger::OnPingFrame(const QuicPingFrame& frame) { |
+ // PingFrame has no contents to log, so just record that it was received. |
+ net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_PING_FRAME_RECEIVED); |
+} |
+ |
void QuicConnectionLogger::OnPublicResetPacket( |
const QuicPublicResetPacket& packet) { |
net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_PUBLIC_RESET_PACKET_RECEIVED); |