Clarify QuicSession::CloseStreamInner() parameters. The parameter "locally_reset" only indicates whether a Rst has been sent. So I changed it to a clearer name. gfe-relnote: no behavior change, not protected. PiperOrigin-RevId: 293034521 Change-Id: Id5db771349c329cacc54833a07a414e39bc91d2e
diff --git a/quic/core/http/quic_spdy_client_session_base.cc b/quic/core/http/quic_spdy_client_session_base.cc index 6adcf70..47083a1 100644 --- a/quic/core/http/quic_spdy_client_session_base.cc +++ b/quic/core/http/quic_spdy_client_session_base.cc
@@ -209,8 +209,8 @@ } void QuicSpdyClientSessionBase::CloseStreamInner(QuicStreamId stream_id, - bool locally_reset) { - QuicSpdySession::CloseStreamInner(stream_id, locally_reset); + bool rst_sent) { + QuicSpdySession::CloseStreamInner(stream_id, rst_sent); if (!VersionUsesHttp3(transport_version())) { headers_stream()->MaybeReleaseSequencerBuffer(); }
diff --git a/quic/core/http/quic_spdy_client_session_base.h b/quic/core/http/quic_spdy_client_session_base.h index 3ca3499..7d4ba01 100644 --- a/quic/core/http/quic_spdy_client_session_base.h +++ b/quic/core/http/quic_spdy_client_session_base.h
@@ -103,7 +103,7 @@ void ResetPromised(QuicStreamId id, QuicRstStreamErrorCode error_code); // Release headers stream's sequencer buffer if it's empty. - void CloseStreamInner(QuicStreamId stream_id, bool locally_reset) override; + void CloseStreamInner(QuicStreamId stream_id, bool rst_sent) override; // Returns true if there are no active requests and no promised streams. bool ShouldReleaseHeadersStreamSequencerBuffer() override;
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc index d12d024..b8de367 100644 --- a/quic/core/quic_session.cc +++ b/quic/core/quic_session.cc
@@ -821,7 +821,7 @@ } } -void QuicSession::CloseStreamInner(QuicStreamId stream_id, bool locally_reset) { +void QuicSession::CloseStreamInner(QuicStreamId stream_id, bool rst_sent) { QUIC_DVLOG(1) << ENDPOINT << "Closing stream " << stream_id; StreamMap::iterator it = stream_map_.find(stream_id); @@ -845,7 +845,7 @@ StreamType type = stream->type(); // Tell the stream that a RST has been sent. - if (locally_reset) { + if (rst_sent) { stream->set_rst_sent(true); }
diff --git a/quic/core/quic_session.h b/quic/core/quic_session.h index a6501c2..c6fae2f 100644 --- a/quic/core/quic_session.h +++ b/quic/core/quic_session.h
@@ -514,9 +514,9 @@ // as a transport parameter, or in the most recent MAX_STREAMS frame. QuicStreamCount GetAdvertisedMaxIncomingBidirectionalStreams() const; - // Performs the work required to close |stream_id|. If |locally_reset| - // then the stream has been reset by this endpoint, not by the peer. - virtual void CloseStreamInner(QuicStreamId stream_id, bool locally_reset); + // Performs the work required to close |stream_id|. If |rst_sent| then a + // Reset Stream frame has already been sent for this stream. + virtual void CloseStreamInner(QuicStreamId stream_id, bool rst_sent); // When a stream is closed locally, it may not yet know how many bytes the // peer sent on that stream.