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

Unified Diff: net/quic/quic_client_session.cc

Issue 638373004: Add a few more details to the QuicClientSession net log event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_client_session.cc
diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
index b7e8185d06629a643897beba5dc5c84d191ba446..44957653c12faf3f15429a18b44e0f7693802ad3 100644
--- a/net/quic/quic_client_session.cc
+++ b/net/quic/quic_client_session.cc
@@ -92,6 +92,18 @@ void RecordHandshakeState(HandshakeState state) {
NUM_HANDSHAKE_STATES);
}
+base::Value* NetLogQuicClientSessionCallback(
+ const QuicServerId* server_id,
+ bool require_confirmation,
+ NetLog::LogLevel /* log_level */) {
+ base::DictionaryValue* dict = new base::DictionaryValue();
+ dict->SetString("host", server_id->host());
+ dict->SetInteger("port", server_id->port());
+ dict->SetBoolean("is_https", server_id->is_https());
+ dict->SetBoolean("require_confirmation", require_confirmation);
+ return dict;
+}
+
} // namespace
QuicClientSession::StreamRequest::StreamRequest() : stream_(nullptr) {}
@@ -174,9 +186,10 @@ void QuicClientSession::InitializeSession(
crypto_config));
QuicClientSessionBase::InitializeSession();
// TODO(rch): pass in full host port proxy pair
- net_log_.BeginEvent(
- NetLog::TYPE_QUIC_SESSION,
- NetLog::StringCallback("host", &server_id.host()));
+ net_log_.BeginEvent(NetLog::TYPE_QUIC_SESSION,
+ base::Bind(NetLogQuicClientSessionCallback,
+ &server_id,
+ require_confirmation_));
}
QuicClientSession::~QuicClientSession() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698