Automated g4 rollback of changelist 460481546.
*** Reason for rollback ***
Breaks Chromium merge.
*** Original change description ***
Adds a QUICHE flag to control oghttp2 debug trace logging.
***
PiperOrigin-RevId: 460976552
diff --git a/quiche/http2/adapter/oghttp2_session.cc b/quiche/http2/adapter/oghttp2_session.cc
index cc9f595..89fc1df 100644
--- a/quiche/http2/adapter/oghttp2_session.cc
+++ b/quiche/http2/adapter/oghttp2_session.cc
@@ -12,25 +12,26 @@
#include "quiche/http2/adapter/http2_visitor_interface.h"
#include "quiche/http2/adapter/noop_header_validator.h"
#include "quiche/http2/adapter/oghttp2_util.h"
-#include "quiche/common/platform/api/quiche_command_line_flags.h"
#include "quiche/spdy/core/spdy_protocol.h"
-DEFINE_QUICHE_COMMAND_LINE_FLAG(
- bool, oghttp2_debug_trace, false,
- "Enables debug trace logging for oghttp2 sessions.");
-
namespace http2 {
namespace adapter {
namespace {
-using quiche::GetQuicheCommandLineFlag;
-
using ConnectionError = Http2VisitorInterface::ConnectionError;
using SpdyFramerError = Http2DecoderAdapter::SpdyFramerError;
using ::spdy::SpdySettingsIR;
+// #define OGHTTP2_DEBUG_TRACE 1
+
+#ifdef OGHTTP2_DEBUG_TRACE
+const bool kTraceLoggingEnabled = true;
+#else
+const bool kTraceLoggingEnabled = false;
+#endif
+
const uint32_t kMaxAllowedMetadataFrameSize = 65536u;
const uint32_t kDefaultHpackTableCapacity = 4096u;
const uint32_t kMaximumHpackTableCapacity = 65536u;
@@ -342,14 +343,10 @@
event_forwarder_([this]() { return !latched_error_; }, *this),
receive_logger_(
&event_forwarder_, TracePerspectiveAsString(options.perspective),
- [enable_trace_logs = GetQuicheCommandLineFlag(
- FLAGS_oghttp2_debug_trace)]() { return enable_trace_logs; },
- this),
+ []() { return kTraceLoggingEnabled; }, this),
send_logger_(
TracePerspectiveAsString(options.perspective),
- [enable_trace_logs = GetQuicheCommandLineFlag(
- FLAGS_oghttp2_debug_trace)]() { return enable_trace_logs; },
- this),
+ []() { return kTraceLoggingEnabled; }, this),
headers_handler_(*this, visitor),
noop_headers_handler_(/*listener=*/nullptr),
connection_window_manager_(