Index: net/quic/quic_connection.cc |
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc |
index c7fb7c040ceaaaba5a5ea3905ad5a6a1dbc41db4..a977b3fdcdb8d13d50f70c0a40d27721ddff9dc2 100644 |
--- a/net/quic/quic_connection.cc |
+++ b/net/quic/quic_connection.cc |
@@ -1241,10 +1241,10 @@ void QuicConnection::WritePendingRetransmissions() { |
// Retransmitted data packets do not use FEC, even when it's enabled. |
// Retransmitted packets use the same sequence number length as the |
// original. |
- // Flush the packet creator before making a new packet. |
+ // Flush the packet generator before making a new packet. |
// TODO(ianswett): Implement ReserializeAllFrames as a separate path that |
// does not require the creator to be flushed. |
- Flush(); |
+ packet_generator_.FlushAllQueuedFrames(); |
SerializedPacket serialized_packet = packet_generator_.ReserializeAllFrames( |
pending.retransmittable_frames.frames(), |
pending.sequence_number_length); |
@@ -1780,7 +1780,7 @@ void QuicConnection::SendConnectionClosePacket(QuicErrorCode error, |
frame->error_code = error; |
frame->error_details = details; |
packet_generator_.AddControlFrame(QuicFrame(frame)); |
- Flush(); |
+ packet_generator_.FlushAllQueuedFrames(); |
} |
void QuicConnection::CloseConnection(QuicErrorCode error, bool from_peer) { |
@@ -1842,10 +1842,6 @@ void QuicConnection::set_max_packet_length(size_t length) { |
return packet_generator_.set_max_packet_length(length); |
} |
-void QuicConnection::Flush() { |
- packet_generator_.FlushAllQueuedFrames(); |
-} |
- |
bool QuicConnection::HasQueuedData() const { |
return pending_version_negotiation_packet_ || |
!queued_packets_.empty() || packet_generator_.HasQueuedFrames(); |