Remove the previous headers_stream_ and Change unowned_headers_stream_ to header_stream_.
The unique_ptr headers_stream is now only used as a temporary variable to pass into stream_map. No need to have it as a member variable anymore.
gfe-relnote: No behavior change. Not protected.
PiperOrigin-RevId: 258403361
Change-Id: Idefbab511707878e6904c58f0aaef7c4f205f710
diff --git a/quic/core/http/quic_spdy_session.cc b/quic/core/http/quic_spdy_session.cc
index 3fe1f5c..367a99b 100644
--- a/quic/core/http/quic_spdy_session.cc
+++ b/quic/core/http/quic_spdy_session.cc
@@ -375,12 +375,12 @@
kDefaultQpackMaxDynamicTableCapacity);
}
- headers_stream_ = QuicMakeUnique<QuicHeadersStream>((this));
+ auto headers_stream = QuicMakeUnique<QuicHeadersStream>((this));
DCHECK_EQ(QuicUtils::GetHeadersStreamId(connection()->transport_version()),
- headers_stream_->id());
+ headers_stream->id());
- unowned_headers_stream_ = headers_stream_.get();
- RegisterStaticStream(std::move(headers_stream_),
+ headers_stream_ = headers_stream.get();
+ RegisterStaticStream(std::move(headers_stream),
/*stream_already_counted = */ false);
if (VersionHasStreamType(connection()->transport_version())) {