Make CreateIncomingStream() to take PendingStream* instead of PendingStream. PendingStream* will be passed to create QuicStream.
non const pointer is used because sequencer and flow controller need to be transferred to QuicStream.
This reduces uses of std::move().
gfe-relnote: refactor. No behavior change. Not flag protected.
PiperOrigin-RevId: 250575271
Change-Id: I8a2897d8a8d76a3da5096bc6d643afe704125433
diff --git a/quic/core/http/quic_spdy_session_test.cc b/quic/core/http/quic_spdy_session_test.cc
index 942688a..5b9a6af 100644
--- a/quic/core/http/quic_spdy_session_test.cc
+++ b/quic/core/http/quic_spdy_session_test.cc
@@ -119,8 +119,8 @@
TestStream(QuicStreamId id, QuicSpdySession* session, StreamType type)
: QuicSpdyStream(id, session, type) {}
- TestStream(PendingStream pending, QuicSpdySession* session, StreamType type)
- : QuicSpdyStream(std::move(pending), session, type) {}
+ TestStream(PendingStream* pending, QuicSpdySession* session, StreamType type)
+ : QuicSpdyStream(pending, session, type) {}
using QuicStream::CloseWriteSide;
@@ -192,10 +192,10 @@
}
}
- TestStream* CreateIncomingStream(PendingStream pending) override {
- QuicStreamId id = pending.id();
+ TestStream* CreateIncomingStream(PendingStream* pending) override {
+ QuicStreamId id = pending->id();
TestStream* stream =
- new TestStream(std::move(pending), this,
+ new TestStream(pending, this,
DetermineStreamType(
id, connection()->transport_version(), perspective(),
/*is_incoming=*/true, BIDIRECTIONAL));