Simplify header lengths field.
headers_lengths and trailers_lengths are only used for their payload length, so we might as well only store payload lengths.
gfe-relnote: v99 only, not protected.
PiperOrigin-RevId: 259636587
Change-Id: I455864328f5c37cb3ba4d080d29f4c2e87e6597d
diff --git a/quic/core/http/quic_spdy_stream.cc b/quic/core/http/quic_spdy_stream.cc
index a8e81c1..97991e8 100644
--- a/quic/core/http/quic_spdy_stream.cc
+++ b/quic/core/http/quic_spdy_stream.cc
@@ -180,8 +180,8 @@
visitor_(nullptr),
blocked_on_decoding_headers_(false),
headers_decompressed_(false),
- headers_length_(0, 0),
- trailers_length_(0, 0),
+ headers_payload_length_(0),
+ trailers_payload_length_(0),
trailers_decompressed_(false),
trailers_consumed_(false),
priority_sent_(false),
@@ -216,8 +216,8 @@
visitor_(nullptr),
blocked_on_decoding_headers_(false),
headers_decompressed_(false),
- headers_length_(0, 0),
- trailers_length_(0, 0),
+ headers_payload_length_(0),
+ trailers_payload_length_(0),
trailers_decompressed_(false),
trailers_consumed_(false),
priority_sent_(false),
@@ -858,9 +858,9 @@
}
if (headers_decompressed_) {
- trailers_length_ = frame_length;
+ trailers_payload_length_ = frame_length.payload_length;
} else {
- headers_length_ = frame_length;
+ headers_payload_length_ = frame_length.payload_length;
}
qpack_decoded_headers_accumulator_ =
@@ -921,8 +921,8 @@
void QuicSpdyStream::ProcessDecodedHeaders(const QuicHeaderList& headers) {
const QuicByteCount frame_length = headers_decompressed_
- ? trailers_length_.payload_length
- : headers_length_.payload_length;
+ ? trailers_payload_length_
+ : headers_payload_length_;
OnStreamHeaderList(/* fin = */ false, frame_length, headers);
qpack_decoded_headers_accumulator_.reset();
}