Commit 53fd8d0b authored by Ian Swett's avatar Ian Swett Committed by Commit Bot

Add QUIC connection close details to the netlog.

R=rch@chromium.org

Change-Id: Ic8cbf358f796827f4570a8cb285a5438060ab953
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506000
Commit-Queue: Ian Swett <ianswett@chromium.org>
Reviewed-by: default avatarRyan Hamilton <rch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638396}
parent 9685b6a1
......@@ -1989,7 +1989,9 @@ EVENT_TYPE(QUIC_SESSION_PUSH_PROMISE_RECEIVED)
// Session was closed, either remotely or by the peer.
// {
// "quic_error": <quic::QuicErrorCode which caused the connection to be
// closed>, "from_peer": <True if the peer closed the connection>
// closed>,
// "details": <The error details string in the connection close.>,
// "from_peer": <True if the peer closed the connection>
// }
EVENT_TYPE(QUIC_SESSION_CLOSED)
......
......@@ -244,10 +244,12 @@ std::unique_ptr<base::Value> NetLogQuicCryptoHandshakeMessageCallback(
std::unique_ptr<base::Value> NetLogQuicOnConnectionClosedCallback(
quic::QuicErrorCode error,
string error_details,
quic::ConnectionCloseSource source,
NetLogCaptureMode /* capture_mode */) {
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("quic_error", error);
dict->SetString("details", error_details);
dict->SetBoolean("from_peer", source == quic::ConnectionCloseSource::FROM_PEER
? true
: false);
......@@ -797,9 +799,9 @@ void QuicConnectionLogger::OnConnectionClosed(
quic::ConnectionCloseSource source) {
if (!net_log_is_capturing_)
return;
net_log_.AddEvent(
NetLogEventType::QUIC_SESSION_CLOSED,
base::Bind(&NetLogQuicOnConnectionClosedCallback, error, source));
net_log_.AddEvent(NetLogEventType::QUIC_SESSION_CLOSED,
base::Bind(&NetLogQuicOnConnectionClosedCallback, error,
error_details, source));
}
void QuicConnectionLogger::OnSuccessfulVersionNegotiation(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment