Add code counts for building version negotiation packets This'll help us decide for how long we need to keep supporting older version negotiation formats. PiperOrigin-RevId: 338719125 Change-Id: Ib9002c5879de3f9fa4cb19e7fc71ee8cb5f37367
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc index cfa56c2..bd80cf3 100644 --- a/quic/core/quic_framer.cc +++ b/quic/core/quic_framer.cc
@@ -1307,6 +1307,15 @@ bool ietf_quic, bool use_length_prefix, const ParsedQuicVersionVector& versions) { + QUIC_CODE_COUNT(quic_build_version_negotiation); + if (use_length_prefix) { + DCHECK(ietf_quic); + QUIC_CODE_COUNT(quic_build_version_negotiation_ietf); + } else if (ietf_quic) { + QUIC_CODE_COUNT(quic_build_version_negotiation_old_ietf); + } else { + QUIC_CODE_COUNT(quic_build_version_negotiation_old_gquic); + } ParsedQuicVersionVector wire_versions = versions; // Add a version reserved for negotiation as suggested by the // "Using Reserved Versions" section of draft-ietf-quic-transport.