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

Unified Diff: net/quic/quic_crypto_stream.cc

Issue 420313005: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0723
Patch Set: change QUIC packet size to 1350 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
Index: net/quic/quic_crypto_stream.cc
diff --git a/net/quic/quic_crypto_stream.cc b/net/quic/quic_crypto_stream.cc
index d53b736527f964fc6af2499c4caf27a288963a60..25467cb3cb6458517ac79d9458f643860ac4064c 100644
--- a/net/quic/quic_crypto_stream.cc
+++ b/net/quic/quic_crypto_stream.cc
@@ -18,10 +18,13 @@ using base::StringPiece;
namespace net {
+#define ENDPOINT (is_server_ ? "Server: " : " Client: ")
wtc 2014/08/04 23:28:13 Nit: It seems that we can just call session()->is_
ramant (doing other things) 2014/08/09 02:53:19 Done.
+
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
@@ -39,6 +42,7 @@ void QuicCryptoStream::OnError(CryptoFramer* framer) {
void QuicCryptoStream::OnHandshakeMessage(
const CryptoHandshakeMessage& message) {
+ DVLOG(1) << ENDPOINT << "Received " << message.DebugString();
session()->OnCryptoHandshakeMessageReceived(message);
}
@@ -57,6 +61,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.

Powered by Google App Engine
This is Rietveld 408576698