Implement QUIC Header Protection

gfe-relnote: Protected by QUIC_VERSION_99
PiperOrigin-RevId: 247137283
Change-Id: I1deb08d304b7739c3c8fa6b995e55fbd8652dc1e
diff --git a/quic/core/quic_dispatcher.h b/quic/core/quic_dispatcher.h
index 9702a09..0c951ed 100644
--- a/quic/core/quic_dispatcher.h
+++ b/quic/core/quic_dispatcher.h
@@ -132,10 +132,11 @@
   // QuicFramerVisitorInterface implementation. Not expected to be called
   // outside of this class.
   void OnPacket() override;
-  // Called when the public header has been parsed.
+  // Called when the public header has been parsed. Returns false when just the
+  // public header is enough to dispatch the packet; true if the framer needs to
+  // continue parsing the packet.
   bool OnUnauthenticatedPublicHeader(const QuicPacketHeader& header) override;
-  // Called when the private header has been parsed of a data packet that is
-  // destined for the time wait manager.
+  // Called when the private header has been parsed.
   bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override;
   void OnError(QuicFramer* framer) override;
   bool OnProtocolVersionMismatch(ParsedQuicVersion received_version,
@@ -378,6 +379,10 @@
   typedef QuicUnorderedSet<QuicConnectionId, QuicConnectionIdHash>
       QuicConnectionIdSet;
 
+  // Based on an unauthenticated packet header |header|, calls ValidityChecks
+  // and then either MaybeRejectStatelessly or ProcessUnauthenticatedHeaderFate.
+  void ProcessHeader(const QuicPacketHeader& header);
+
   // Attempts to reject the connection statelessly, if stateless rejects are
   // possible and if the current packet contains a CHLO message.  Determines a
   // fate which describes what subsequent processing should be performed on the