Remove platform/http2_macros.
PiperOrigin-RevId: 421322609
diff --git a/http2/decoder/http2_frame_decoder.cc b/http2/decoder/http2_frame_decoder.cc
index 55dea39..ec2034b 100644
--- a/http2/decoder/http2_frame_decoder.cc
+++ b/http2/decoder/http2_frame_decoder.cc
@@ -10,7 +10,7 @@
#include "http2/platform/api/http2_bug_tracker.h"
#include "http2/platform/api/http2_flag_utils.h"
#include "http2/platform/api/http2_flags.h"
-#include "http2/platform/api/http2_macros.h"
+#include "common/platform/api/quiche_logging.h"
namespace http2 {
@@ -72,7 +72,7 @@
return DiscardPayload(db);
}
- HTTP2_UNREACHABLE();
+ QUICHE_NOTREACHED();
return DecodeStatus::kDecodeError;
}
diff --git a/http2/hpack/decoder/hpack_decoder_state.cc b/http2/hpack/decoder/hpack_decoder_state.cc
index 3140a19..92c7b25 100644
--- a/http2/hpack/decoder/hpack_decoder_state.cc
+++ b/http2/hpack/decoder/hpack_decoder_state.cc
@@ -8,7 +8,7 @@
#include "http2/http2_constants.h"
#include "http2/platform/api/http2_logging.h"
-#include "http2/platform/api/http2_macros.h"
+#include "common/platform/api/quiche_logging.h"
namespace http2 {
namespace {
@@ -26,13 +26,16 @@
} // namespace
HpackDecoderState::HpackDecoderState(HpackDecoderListener* listener)
- : listener_(HTTP2_DIE_IF_NULL(listener)),
+ : listener_(listener),
final_header_table_size_(Http2SettingsInfo::DefaultHeaderTableSize()),
lowest_header_table_size_(final_header_table_size_),
require_dynamic_table_size_update_(false),
allow_dynamic_table_size_update_(true),
saw_dynamic_table_size_update_(false),
- error_(HpackDecodingError::kOk) {}
+ error_(HpackDecodingError::kOk) {
+ QUICHE_CHECK(listener_);
+}
+
HpackDecoderState::~HpackDecoderState() = default;
void HpackDecoderState::ApplyHeaderTableSizeSetting(
diff --git a/http2/hpack/decoder/hpack_whole_entry_buffer.cc b/http2/hpack/decoder/hpack_whole_entry_buffer.cc
index 5f3e63e..1752ba5 100644
--- a/http2/hpack/decoder/hpack_whole_entry_buffer.cc
+++ b/http2/hpack/decoder/hpack_whole_entry_buffer.cc
@@ -8,7 +8,7 @@
#include "http2/platform/api/http2_flag_utils.h"
#include "http2/platform/api/http2_flags.h"
#include "http2/platform/api/http2_logging.h"
-#include "http2/platform/api/http2_macros.h"
+#include "common/platform/api/quiche_logging.h"
#include "common/quiche_text_utils.h"
namespace http2 {
@@ -21,7 +21,8 @@
HpackWholeEntryBuffer::~HpackWholeEntryBuffer() = default;
void HpackWholeEntryBuffer::set_listener(HpackWholeEntryListener* listener) {
- listener_ = HTTP2_DIE_IF_NULL(listener);
+ QUICHE_CHECK(listener);
+ listener_ = listener;
}
void HpackWholeEntryBuffer::set_max_string_size_bytes(
diff --git a/http2/platform/api/http2_macros.h b/http2/platform/api/http2_macros.h
deleted file mode 100644
index c2f990c..0000000
--- a/http2/platform/api/http2_macros.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef QUICHE_HTTP2_PLATFORM_API_HTTP2_MACROS_H_
-#define QUICHE_HTTP2_PLATFORM_API_HTTP2_MACROS_H_
-
-#include "net/http2/platform/impl/http2_macros_impl.h"
-
-#define HTTP2_UNREACHABLE() HTTP2_UNREACHABLE_IMPL()
-#define HTTP2_DIE_IF_NULL(ptr) HTTP2_DIE_IF_NULL_IMPL(ptr)
-
-#endif // QUICHE_HTTP2_PLATFORM_API_HTTP2_MACROS_H_