Refactor QuicConnection::AddIncomingConnectionId
In order to prepare for draft-28, this CL refactors how we set the original_destination_connection_id on QuicConnection. The original plan for AddIncomingConnectionId was to be used in more places, but today it is only used for the original connection ID, so we're refactoring it to allow saving off that connection ID in a subsequent change. This CL has no behavior change.
Refactor, no behavior change, not flag protected
PiperOrigin-RevId: 313465625
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index c78cf0b..420f8c8 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -947,9 +947,10 @@
// Returns the largest received packet number sent by peer.
QuicPacketNumber GetLargestReceivedPacket() const;
- // Adds the connection ID to a set of connection IDs that are accepted as
- // destination on incoming packets.
- void AddIncomingConnectionId(QuicConnectionId connection_id);
+ // Sets the original destination connection ID on the connection.
+ // This is called by QuicDispatcher when it has replaced the connection ID.
+ void SetOriginalDestinationConnectionId(
+ const QuicConnectionId& original_destination_connection_id);
// Called when ACK alarm goes off. Sends ACKs of those packet number spaces
// which have expired ACK timeout. Only used when this connection supports