Remove QuicConnectionProcessPacketContext.

This is a manual rollback of cl/473354194, the `QuicConnectionProcessPacketContext` being removed is only used to debug b/245950352.

PiperOrigin-RevId: 628478608
diff --git a/quiche/quic/core/quic_connection_context.cc b/quiche/quic/core/quic_connection_context.cc
index 28e9d8e..a2b797d 100644
--- a/quiche/quic/core/quic_connection_context.cc
+++ b/quiche/quic/core/quic_connection_context.cc
@@ -5,24 +5,12 @@
 #include "quiche/quic/core/quic_connection_context.h"
 
 #include "absl/base/attributes.h"
-#include "quiche/common/quiche_text_utils.h"
 
 namespace quic {
 namespace {
 ABSL_CONST_INIT thread_local QuicConnectionContext* current_context = nullptr;
 }  // namespace
 
-std::string QuicConnectionProcessPacketContext::DebugString() const {
-  if (decrypted_payload.empty()) {
-    return "Not processing packet";
-  }
-
-  return absl::StrCat("current_frame_offset: ", current_frame_offset,
-                      ", payload size: ", decrypted_payload.size(),
-                      ", payload hexdump: ",
-                      quiche::QuicheTextUtils::HexDump(decrypted_payload));
-}
-
 // static
 QuicConnectionContext* QuicConnectionContext::Current() {
   return current_context;
diff --git a/quiche/quic/core/quic_connection_context.h b/quiche/quic/core/quic_connection_context.h
index e5b2a4d..222910e 100644
--- a/quiche/quic/core/quic_connection_context.h
+++ b/quiche/quic/core/quic_connection_context.h
@@ -61,23 +61,6 @@
                          absl::string_view bug_message) = 0;
 };
 
-// QuicConnectionProcessPacketContext is a member of QuicConnectionContext that
-// contains information of the packet currently being processed by the owning
-// QuicConnection.
-struct QUICHE_EXPORT QuicConnectionProcessPacketContext final {
-  // If !empty(), the decrypted payload of the packet currently being processed.
-  absl::string_view decrypted_payload;
-
-  // The offset within |decrypted_payload|, if it's non-empty, that marks the
-  // start of the frame currently being processed.
-  // Should not be used when |decrypted_payload| is empty.
-  size_t current_frame_offset = 0;
-
-  // NOTE: This can be very expansive. If used in logs, make sure it is rate
-  // limited via QUIC_BUG etc.
-  std::string DebugString() const;
-};
-
 // QuicConnectionContext is a per-QuicConnection context that includes
 // facilities useable by any part of a QuicConnection. A QuicConnectionContext
 // is owned by a QuicConnection.
@@ -95,9 +78,6 @@
 
   std::unique_ptr<QuicConnectionTracer> tracer;
   std::unique_ptr<QuicBugListener> bug_listener;
-
-  // Information about the packet currently being processed.
-  QuicConnectionProcessPacketContext process_packet_context;
 };
 
 // QuicConnectionContextSwitcher is a RAII object used for maintaining the
diff --git a/quiche/quic/core/quic_framer.cc b/quiche/quic/core/quic_framer.cc
index 2c6d094..9e3d9dd 100644
--- a/quiche/quic/core/quic_framer.cc
+++ b/quiche/quic/core/quic_framer.cc
@@ -18,7 +18,6 @@
 #include "absl/base/attributes.h"
 #include "absl/base/macros.h"
 #include "absl/base/optimization.h"
-#include "absl/cleanup/cleanup.h"
 #include "absl/status/status.h"
 #include "absl/strings/escaping.h"
 #include "absl/strings/numbers.h"
@@ -37,7 +36,6 @@
 #include "quiche/quic/core/crypto/quic_random.h"
 #include "quiche/quic/core/frames/quic_ack_frequency_frame.h"
 #include "quiche/quic/core/frames/quic_reset_stream_at_frame.h"
-#include "quiche/quic/core/quic_connection_context.h"
 #include "quiche/quic/core/quic_connection_id.h"
 #include "quiche/quic/core/quic_constants.h"
 #include "quiche/quic/core/quic_data_reader.h"
@@ -1872,21 +1870,6 @@
   }
   QuicDataReader reader(decrypted_buffer, decrypted_length);
 
-  // Remember decrypted_payload in the current connection context until the end
-  // of this function.
-  auto* connection_context = QuicConnectionContext::Current();
-  if (connection_context != nullptr) {
-    connection_context->process_packet_context.decrypted_payload =
-        reader.FullPayload();
-    connection_context->process_packet_context.current_frame_offset = 0;
-  }
-  auto clear_decrypted_payload = absl::MakeCleanup([&]() {
-    if (connection_context != nullptr) {
-      connection_context->process_packet_context.decrypted_payload =
-          absl::string_view();
-    }
-  });
-
   // Update the largest packet number after we have decrypted the packet
   // so we are confident is not attacker controlled.
   if (supports_multiple_packet_number_spaces_) {
@@ -2796,13 +2779,7 @@
   }
 
   QUIC_DVLOG(2) << ENDPOINT << "Processing IETF packet with header " << header;
-  auto* connection_context = QuicConnectionContext::Current();
   while (!reader->IsDoneReading()) {
-    if (connection_context != nullptr) {
-      connection_context->process_packet_context.current_frame_offset =
-          connection_context->process_packet_context.decrypted_payload.size() -
-          reader->BytesRemaining();
-    }
     uint64_t frame_type;
     // Will be the number of bytes into which frame_type was encoded.
     size_t encoded_bytes = reader->BytesRemaining();