gfe-relnote: (n/a) Remove unused function QuicConnection::EnableSavingCryptoPackets. Not protected. This function was used for stateless rejects, which has been removed. PiperOrigin-RevId: 252041802 Change-Id: Ic5e91e5e0c89651a54712ec795facfe3ceeb03e2
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc index 5e8e100..fad4a3b 100644 --- a/quic/core/quic_connection.cc +++ b/quic/core/quic_connection.cc
@@ -258,7 +258,6 @@ max_tracked_packets_(kMaxTrackedPackets), pending_version_negotiation_packet_(false), send_ietf_version_negotiation_packet_(false), - save_crypto_packets_as_termination_packets_(false), idle_timeout_connection_close_behavior_( ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET), close_connection_after_five_rtos_(false), @@ -3223,10 +3222,6 @@ packet_generator_.HasQueuedFrames(); } -void QuicConnection::EnableSavingCryptoPackets() { - save_crypto_packets_as_termination_packets_ = true; -} - bool QuicConnection::CanWriteStreamData() { // Don't write stream data if there are negotiation or queued data packets // to send. Otherwise, continue and bundle as many frames as possible. @@ -3560,10 +3555,6 @@ if (frame.type == CONNECTION_CLOSE_FRAME) { return true; } - if (save_crypto_packets_as_termination_packets_ && - QuicUtils::IsHandshakeFrame(frame, transport_version())) { - return true; - } } return false; }
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h index a0d0cd0..601dad9 100644 --- a/quic/core/quic_connection.h +++ b/quic/core/quic_connection.h
@@ -604,10 +604,6 @@ // Testing only. size_t NumQueuedPackets() const { return queued_packets_.size(); } - // Once called, any sent crypto packets to be saved as the - // termination packet, for use with stateless rejections. - void EnableSavingCryptoPackets(); - // Returns true if the underlying UDP socket is writable, there is // no queued data and the connection is not congestion-control // blocked. @@ -1260,9 +1256,6 @@ // the original scope of the SerializedPacket. QueuedPacketList queued_packets_; - // If true, then crypto packets will be saved as termination packets. - bool save_crypto_packets_as_termination_packets_; - // Contains the connection close packets if the connection has been closed. std::unique_ptr<std::vector<std::unique_ptr<QuicEncryptedPacket>>> termination_packets_;