Index: net/quic/quic_connection.cc |
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc |
index 7b9a6b3a5f414d2755264e1c363f789a2191465c..04426d3a50935a59d9eb2ab357fa102ca8d42584 100644 |
--- a/net/quic/quic_connection.cc |
+++ b/net/quic/quic_connection.cc |
@@ -949,7 +949,7 @@ void QuicConnection::MaybeSendInResponseToPacket() { |
// Now that we have received an ack, we might be able to send packets which |
// are queued locally, or drain streams which are blocked. |
- if (CanWrite(NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA)) { |
+ if (CanWrite(HAS_RETRANSMITTABLE_DATA)) { |
OnCanWrite(); |
} |
} |
@@ -1138,7 +1138,7 @@ void QuicConnection::OnCanWrite() { |
// 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)) { |
+ if (!CanWrite(HAS_RETRANSMITTABLE_DATA)) { |
return; |
} |
@@ -1152,7 +1152,7 @@ void QuicConnection::OnCanWrite() { |
// blocked or the congestion manager to prohibit sending, so check again. |
if (visitor_->WillingAndAbleToWrite() && |
!resume_writes_alarm_->IsSet() && |
- CanWrite(NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA)) { |
+ CanWrite(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. |
@@ -1223,7 +1223,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)) { |
+ !CanWrite(HAS_RETRANSMITTABLE_DATA)) { |
break; |
} |
@@ -1281,11 +1281,10 @@ bool QuicConnection::ShouldGeneratePacket( |
return true; |
} |
- return CanWrite(transmission_type, retransmittable); |
+ return CanWrite(retransmittable); |
} |
-bool QuicConnection::CanWrite(TransmissionType transmission_type, |
- HasRetransmittableData retransmittable) { |
+bool QuicConnection::CanWrite(HasRetransmittableData retransmittable) { |
if (writer_->IsWriteBlocked()) { |
visitor_->OnWriteBlocked(); |
return false; |
@@ -1294,7 +1293,7 @@ bool QuicConnection::CanWrite(TransmissionType transmission_type, |
send_alarm_->Cancel(); |
QuicTime now = clock_->Now(); |
QuicTime::Delta delay = sent_packet_manager_.TimeUntilSend( |
- now, transmission_type, retransmittable); |
+ now, retransmittable); |
if (delay.IsInfinite()) { |
return false; |
} |
@@ -1323,8 +1322,7 @@ bool QuicConnection::WritePacket(QueuedPacket packet) { |
// This ensures packets are sent in sequence number order. |
// 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)) { |
+ if (packet.type == NORMAL && !CanWrite(packet.retransmittable)) { |
return false; |
} |