Rename QuicSpdySession::SendMaxHeaderListSize()
to QuicSpdySession::SendInitialData(). Make this method private
and use max_inbound_header_list_size_ explicitly instead of
requiring it to be passed in by the caller.
gfe-relnote: n/a - Rename only
PiperOrigin-RevId: 274271904
Change-Id: I3dd1094b441cf0929599d9dc3f65aabb3483149f
diff --git a/quic/core/http/quic_spdy_session.cc b/quic/core/http/quic_spdy_session.cc
index 6f1f22e..3c6359f 100644
--- a/quic/core/http/quic_spdy_session.cc
+++ b/quic/core/http/quic_spdy_session.cc
@@ -537,7 +537,7 @@
<< "Server must not send priority";
QuicConnection::ScopedPacketFlusher flusher(connection());
- SendMaxHeaderListSize(max_inbound_header_list_size_);
+ SendInitialData();
send_control_stream_->WritePriority(priority);
}
@@ -579,7 +579,7 @@
stream->WritePushPromise(frame);
}
-void QuicSpdySession::SendMaxHeaderListSize(size_t value) {
+void QuicSpdySession::SendInitialData() {
if (VersionUsesHttp3(transport_version())) {
QuicConnection::ScopedPacketFlusher flusher(connection());
send_control_stream_->MaybeSendSettingsFrame();
@@ -595,7 +595,8 @@
}
SpdySettingsIR settings_frame;
- settings_frame.AddSetting(SETTINGS_MAX_HEADER_LIST_SIZE, value);
+ settings_frame.AddSetting(SETTINGS_MAX_HEADER_LIST_SIZE,
+ max_inbound_header_list_size_);
SpdySerializedFrame frame(spdy_framer_.SerializeFrame(settings_frame));
headers_stream()->WriteOrBufferData(
@@ -631,7 +632,7 @@
QuicSession::OnCryptoHandshakeEvent(event);
if (VersionUsesHttp3(transport_version()) ||
(event == HANDSHAKE_CONFIRMED && config()->SupportMaxHeaderListSize())) {
- SendMaxHeaderListSize(max_inbound_header_list_size_);
+ SendInitialData();
}
}
diff --git a/quic/core/http/quic_spdy_session.h b/quic/core/http/quic_spdy_session.h
index 51e3cea..29046c3 100644
--- a/quic/core/http/quic_spdy_session.h
+++ b/quic/core/http/quic_spdy_session.h
@@ -159,9 +159,6 @@
QuicStreamId promised_stream_id,
spdy::SpdyHeaderBlock headers);
- // Sends SETTINGS_MAX_HEADER_LIST_SIZE SETTINGS frame.
- void SendMaxHeaderListSize(size_t value);
-
QpackEncoder* qpack_encoder();
QpackDecoder* qpack_decoder();
QuicHeadersStream* headers_stream() { return headers_stream_; }
@@ -349,6 +346,10 @@
void CloseConnectionOnDuplicateHttp3UnidirectionalStreams(
QuicStringPiece type);
+ // Sends any data which should be sent at the start of a connection,
+ // including the initial SETTINGS frame, etc.
+ void SendInitialData();
+
std::unique_ptr<QpackEncoder> qpack_encoder_;
std::unique_ptr<QpackDecoder> qpack_decoder_;