Index: net/quic/quic_session.cc |
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc |
index 809ebd8d5d7a1d2a9bf2a42fdd042e55124085c7..bbf9630da5ed10a4f616d51b5c0e8459f67d44c4 100644 |
--- a/net/quic/quic_session.cc |
+++ b/net/quic/quic_session.cc |
@@ -113,8 +113,7 @@ QuicSession::QuicSession(QuicConnection* connection, const QuicConfig& config) |
perspective(), |
kMinimumFlowControlSendWindow, |
config_.GetInitialSessionFlowControlWindowToSend(), |
- false), |
- has_pending_handshake_(false) {} |
+ false) {} |
void QuicSession::Initialize() { |
connection_->set_visitor(visitor_shim_.get()); |
@@ -259,9 +258,6 @@ void QuicSession::OnCanWrite() { |
return; |
} |
QuicStreamId stream_id = write_blocked_streams_.PopFront(); |
- if (stream_id == kCryptoStreamId) { |
- has_pending_handshake_ = false; // We just popped it. |
- } |
ReliableQuicStream* stream = GetStream(stream_id); |
if (stream != nullptr && !stream->flow_controller()->IsBlocked()) { |
// If the stream can't write all bytes it'll re-add itself to the blocked |
@@ -282,7 +278,7 @@ bool QuicSession::WillingAndAbleToWrite() const { |
} |
bool QuicSession::HasPendingHandshake() const { |
- return has_pending_handshake_; |
+ return write_blocked_streams_.crypto_stream_blocked(); |
} |
bool QuicSession::HasOpenDynamicStreams() const { |
@@ -748,14 +744,6 @@ void QuicSession::MarkConnectionLevelWriteBlocked(QuicStreamId id, |
} |
#endif |
- if (id == kCryptoStreamId) { |
- DCHECK(!has_pending_handshake_); |
- has_pending_handshake_ = true; |
- // TODO(jar): Be sure to use the highest priority for the crypto stream, |
- // perhaps by adding a "special" priority for it that is higher than |
- // kHighestPriority. |
- priority = kHighestPriority; |
- } |
write_blocked_streams_.AddStream(id, priority); |
} |