Skip to content

Commit

Permalink
Remove gQUIC push related comments.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 574148204
  • Loading branch information
bnc-google authored and copybara-github committed Oct 17, 2023
1 parent e8ad0f4 commit 1ae6fa9
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 26 deletions.
4 changes: 2 additions & 2 deletions quiche/quic/core/http/end_to_end_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4776,8 +4776,8 @@ TEST_P(EndToEndTest, DISABLED_TestHugeResponseWithPacketLoss) {
}

TEST_P(EndToEndTest, ReleaseHeadersStreamBufferWhenIdle) {
// Tests that when client side has no active request and no waiting
// PUSH_PROMISE, its headers stream's sequencer buffer should be released.
// Tests that when client side has no active request,
// its headers stream's sequencer buffer should be released.
ASSERT_TRUE(Initialize());
client_->SendSynchronousRequest("/foo");
if (version_.UsesHttp3()) {
Expand Down
6 changes: 3 additions & 3 deletions quiche/quic/core/http/quic_headers_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ namespace test {
class QuicHeadersStreamPeer;
} // namespace test

// Headers in QUIC are sent as HTTP/2 HEADERS or PUSH_PROMISE frames over a
// reserved stream with the id 3. Each endpoint (client and server) will
// allocate an instance of QuicHeadersStream to send and receive headers.
// Headers in QUIC are sent as HTTP/2 HEADERS frames over a reserved stream with
// the id 3. Each endpoint (client and server) will allocate an instance of
// QuicHeadersStream to send and receive headers.
class QUICHE_EXPORT QuicHeadersStream : public QuicStream {
public:
explicit QuicHeadersStream(QuicSpdySession* session);
Expand Down
3 changes: 1 addition & 2 deletions quiche/quic/core/http/quic_spdy_client_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class QuicServerId;

class QUICHE_EXPORT QuicSpdyClientSession : public QuicSpdyClientSessionBase {
public:
// Takes ownership of |connection|. Caller retains ownership of
// |promised_by_url|.
// Takes ownership of |connection|.
QuicSpdyClientSession(const QuicConfig& config,
const ParsedQuicVersionVector& supported_versions,
QuicConnection* connection,
Expand Down
5 changes: 2 additions & 3 deletions quiche/quic/core/http/quic_spdy_client_session_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class QUICHE_EXPORT QuicSpdyClientSessionBase
: public QuicSpdySession,
public QuicCryptoClientStream::ProofHandler {
public:
// Takes ownership of |connection|. Caller retains ownership of
// |promised_by_url|.
// Takes ownership of |connection|.
QuicSpdyClientSessionBase(QuicConnection* connection,
QuicSession::Visitor* visitor,
const QuicConfig& config,
Expand All @@ -37,7 +36,7 @@ class QUICHE_EXPORT QuicSpdyClientSessionBase
// Release headers stream's sequencer buffer if it's empty.
void OnStreamClosed(QuicStreamId stream_id) override;

// Returns true if there are no active requests and no promised streams.
// Returns true if there are no active requests.
bool ShouldReleaseHeadersStreamSequencerBuffer() override;

// Override to wait for all received responses to be consumed by application.
Expand Down
1 change: 0 additions & 1 deletion quiche/quic/core/http/quic_spdy_client_session_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class QuicSpdyClientSessionTest : public QuicTestWithParam<ParsedQuicVersion> {
}

~QuicSpdyClientSessionTest() override {
// Session must be destroyed before promised_by_url_
session_.reset(nullptr);
}

Expand Down
2 changes: 0 additions & 2 deletions quiche/quic/core/http/quic_spdy_client_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ void QuicSpdyClientStream::OnTrailingHeadersComplete(
}

void QuicSpdyClientStream::OnBodyAvailable() {
// For push streams, visitor will not be set until the rendezvous
// between server promise and client request is complete.
if (visitor() == nullptr) return;

while (HasBytesToRead()) {
Expand Down
1 change: 0 additions & 1 deletion quiche/quic/core/http/quic_spdy_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ using spdy::SpdyHeadersIR;
using spdy::SpdyPingId;
using spdy::SpdyPriority;
using spdy::SpdyPriorityIR;
using spdy::SpdyPushPromiseIR;
using spdy::SpdySerializedFrame;
using spdy::SpdySettingsId;
using spdy::SpdyStreamId;
Expand Down
2 changes: 1 addition & 1 deletion quiche/quic/core/http/quic_spdy_stream_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ TEST_P(QuicSpdyStreamTest, Http3FrameError) {

Initialize(kShouldProcessData);

// PUSH_PROMISE frame with empty payload is considered invalid.
// PUSH_PROMISE frame is considered invalid.
std::string invalid_http3_frame = absl::HexStringToBytes("0500");
QuicStreamFrame stream_frame(stream_->id(), /* fin = */ false,
/* offset = */ 0, invalid_http3_frame);
Expand Down
8 changes: 4 additions & 4 deletions quiche/quic/core/qpack/qpack_blocking_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ class QUICHE_EXPORT QpackBlockingManager {
friend test::QpackBlockingManagerPeer;

// A stream typically has only one header block, except for the rare cases of
// 1xx responses, trailers, or push promises. Even if there are multiple
// header blocks sent on a single stream, they might not be blocked at the
// same time. Use std::list instead of quiche::QuicheCircularDeque because it
// has lower memory footprint when holding few elements.
// 1xx responses and trailers. Even if there are multiple header blocks sent
// on a single stream, they might not be blocked at the same time. Use
// std::list instead of quiche::QuicheCircularDeque because it has lower
// memory footprint when holding few elements.
using HeaderBlocksForStream = std::list<IndexSet>;
using HeaderBlocks = absl::flat_hash_map<QuicStreamId, HeaderBlocksForStream>;

Expand Down
4 changes: 1 addition & 3 deletions quiche/quic/core/quic_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -760,11 +760,9 @@ class QUICHE_EXPORT QuicSession
// Returns true if the stream is a static stream.
bool IsStaticStream(QuicStreamId id) const;

// Close connection when receive a frame for a locally-created nonexistent
// Close connection when receiving a frame for a locally-created nonexistent
// stream.
// Prerequisite: IsClosedStream(stream_id) == false
// Server session might need to override this method to allow server push
// stream to be promised before creating an active stream.
virtual void HandleFrameOnNonexistentOutgoingStream(QuicStreamId stream_id);

virtual bool MaybeIncreaseLargestPeerStreamId(const QuicStreamId stream_id);
Expand Down
4 changes: 2 additions & 2 deletions quiche/quic/tools/quic_simple_server_session_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ TEST_P(QuicSimpleServerSessionTest, CreateOutgoingDynamicStreamUnencrypted) {
QuicSessionPeer::GetNumOpenDynamicStreams(session_.get()));
}

// Tests that calling GetOrCreateStream() on an outgoing stream not promised yet
// should result close connection.
// Tests that calling GetOrCreateStream() on an outgoing stream should result in
// the connection being closed.
TEST_P(QuicSimpleServerSessionTest, GetEvenIncomingError) {
const size_t initial_num_open_stream =
QuicSessionPeer::GetNumOpenDynamicStreams(session_.get());
Expand Down
2 changes: 0 additions & 2 deletions quiche/quic/tools/quic_spdy_client_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ QuicSpdyClientBase::QuicSpdyClientBase(
latest_response_code_(-1) {}

QuicSpdyClientBase::~QuicSpdyClientBase() {
// We own the push promise index. We need to explicitly kill
// the session before the push promise index goes out of scope.
ResetSession();
}

Expand Down

0 comments on commit 1ae6fa9

Please sign in to comment.