Have framer store frame type currently being processed

This CL has QuicFramer save the frame type for the frame that it currently
is extracting from the packet and processing. This is done so that the
IETF QUIC Transport Connection Close can get the type of frame that
precipitated the close. If the frame-type was not saved like this then
it would need to be passed around in the call stack -- one more parameter
threaded throughout many calls in QUIC.

This done only when IETF Framing (version 99) is enabled.

Tests in quic_framer_test.cc have been modified to check that the right
frame type has been saved (done in all of the On...Frame upcalls, so that
the testing is fairly complete). Also checks that the saved type is 0
when not processing a frame (eg, when doing header processing) OR when not
doing IETF QUIC Framing.

gfe-relnote: N/A is only for Version 99/IETF QUIC Framing.
PiperOrigin-RevId: 265888094
Change-Id: If068d49c9f72b4e3c0e8eb3e7ab7460abde85f8a
diff --git a/quic/core/quic_framer.h b/quic/core/quic_framer.h
index 5cfba86..f429a83 100644
--- a/quic/core/quic_framer.h
+++ b/quic/core/quic_framer.h
@@ -610,6 +610,10 @@
     return first_sending_packet_number_;
   }
 
+  uint64_t current_received_frame_type() const {
+    return current_received_frame_type_;
+  }
+
   // The connection ID length the framer expects on incoming IETF short headers
   // on the server.
   uint8_t GetExpectedServerConnectionIdLength() {
@@ -1098,6 +1102,12 @@
   // the peer in the transport parameter negotiation. IETF QUIC only.
   uint32_t peer_ack_delay_exponent_;
   uint32_t local_ack_delay_exponent_;
+
+  // The type of received IETF frame currently being processed.  0 when not
+  // processing a frame or when processing Google QUIC frames.  Used to populate
+  // the Transport Connection Close when there is an error during frame
+  // processing.
+  uint64_t current_received_frame_type_;
 };
 
 // Look for and parse the error code from the "<quic_error_code>:" text that