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

Unified Diff: net/quic/quic_crypto_stream.cc

Issue 428803002: Improve debug logging of QUIC crypto handshake. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_bug_in_QuicUnackedPacketMap_71783653
Patch Set: Created 6 years, 5 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 | « net/quic/quic_crypto_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_crypto_stream.cc
diff --git a/net/quic/quic_crypto_stream.cc b/net/quic/quic_crypto_stream.cc
index 36b7c4550a28107895145d5e59837ccf0dfffbdd..31de659ba7b34219df1691036da2686bfff976bb 100644
--- a/net/quic/quic_crypto_stream.cc
+++ b/net/quic/quic_crypto_stream.cc
@@ -17,10 +17,13 @@ using base::StringPiece;
namespace net {
+#define ENDPOINT (is_server_ ? "Server: " : " Client: ")
+
QuicCryptoStream::QuicCryptoStream(QuicSession* session)
: ReliableQuicStream(kCryptoStreamId, session),
encryption_established_(false),
- handshake_confirmed_(false) {
+ handshake_confirmed_(false),
+ is_server_(session->is_server()) {
crypto_framer_.set_visitor(this);
if (version() <= QUIC_VERSION_20) {
// Prior to QUIC_VERSION_21 the crypto stream is not subject to any flow
@@ -38,6 +41,7 @@ void QuicCryptoStream::OnError(CryptoFramer* framer) {
void QuicCryptoStream::OnHandshakeMessage(
const CryptoHandshakeMessage& message) {
+ DVLOG(1) << ENDPOINT << "Received " << message.DebugString();
session()->OnCryptoHandshakeMessageReceived(message);
}
@@ -56,6 +60,7 @@ QuicPriority QuicCryptoStream::EffectivePriority() const {
void QuicCryptoStream::SendHandshakeMessage(
const CryptoHandshakeMessage& message) {
+ DVLOG(1) << ENDPOINT << "Sending " << message.DebugString();
session()->OnCryptoHandshakeMessageSent(message);
const QuicData& data = message.GetSerialized();
// TODO(wtc): check the return value.
« no previous file with comments | « net/quic/quic_crypto_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698