Index: net/quic/quic_connection.cc |
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc |
index a0371e86326add2bfd90d674112d6e8d80390185..d834f207630c5c563c30d154ae966b1554103f71 100644 |
--- a/net/quic/quic_connection.cc |
+++ b/net/quic/quic_connection.cc |
@@ -1168,14 +1168,11 @@ void QuicConnection::OnCanWrite() { |
WriteQueuedPackets(); |
WritePendingRetransmissions(); |
- IsHandshake pending_handshake = visitor_->HasPendingHandshake() ? |
- IS_HANDSHAKE : NOT_HANDSHAKE; |
// Sending queued packets may have caused the socket to become write blocked, |
// or the congestion manager to prohibit sending. If we've sent everything |
// we had queued and we're still not blocked, let the visitor know it can |
// write more. |
- if (!CanWrite(NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA, |
- pending_handshake)) { |
+ if (!CanWrite(NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA)) { |
return; |
} |
@@ -1187,11 +1184,8 @@ void QuicConnection::OnCanWrite() { |
// After the visitor writes, it may have caused the socket to become write |
// blocked or the congestion manager to prohibit sending, so check again. |
- pending_handshake = visitor_->HasPendingHandshake() ? |
- IS_HANDSHAKE : NOT_HANDSHAKE; |
if (visitor_->HasPendingWrites() && !resume_writes_alarm_->IsSet() && |
- CanWrite(NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA, |
- pending_handshake)) { |
+ CanWrite(NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA)) { |
// We're not write blocked, but some stream didn't write out all of its |
// bytes. Register for 'immediate' resumption so we'll keep writing after |
// other connections and events have had a chance to use the thread. |
@@ -1262,8 +1256,7 @@ void QuicConnection::WritePendingRetransmissions() { |
const QuicSentPacketManager::PendingRetransmission pending = |
sent_packet_manager_.NextPendingRetransmission(); |
if (GetPacketType(&pending.retransmittable_frames) == NORMAL && |
- !CanWrite(pending.transmission_type, HAS_RETRANSMITTABLE_DATA, |
- pending.retransmittable_frames.HasCryptoHandshake())) { |
+ !CanWrite(pending.transmission_type, HAS_RETRANSMITTABLE_DATA)) { |
break; |
} |
@@ -1321,12 +1314,11 @@ bool QuicConnection::ShouldGeneratePacket( |
return true; |
} |
- return CanWrite(transmission_type, retransmittable, handshake); |
+ return CanWrite(transmission_type, retransmittable); |
} |
bool QuicConnection::CanWrite(TransmissionType transmission_type, |
- HasRetransmittableData retransmittable, |
- IsHandshake handshake) { |
+ HasRetransmittableData retransmittable) { |
if (writer_->IsWriteBlocked()) { |
visitor_->OnWriteBlocked(); |
return false; |
@@ -1374,8 +1366,7 @@ bool QuicConnection::WritePacket(QueuedPacket packet) { |
// TODO(ianswett): The congestion control should have been consulted before |
// serializing the packet, so this could be turned into a LOG_IF(DFATAL). |
if (packet.type == NORMAL && !CanWrite(packet.transmission_type, |
- packet.retransmittable, |
- packet.handshake)) { |
+ packet.retransmittable)) { |
return false; |
} |