Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Unified Diff: net/quic/core/quic_session.cc

Issue 2916233002: Remove is_deletable_ from QuicStream. Add QuicStream::IsWaitingForAcks (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_session.h ('k') | net/quic/core/quic_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_session.cc
diff --git a/net/quic/core/quic_session.cc b/net/quic/core/quic_session.cc
index 032cc0052c1d38c7f6b6b16d547d092371f5dd65..7c1bf263417842c0957aeb5482dd6e935d23f0eb 100644
--- a/net/quic/core/quic_session.cc
+++ b/net/quic/core/quic_session.cc
@@ -72,10 +72,6 @@ QuicSession::~QuicSession() {
"still waiting for final byte offset: "
<< GetNumLocallyClosedOutgoingStreamsHighestOffset();
QUIC_LOG_IF(WARNING, !zombie_streams_.empty()) << "Still have zombie streams";
- for (const auto& kv : dynamic_stream_map_) {
- QUIC_LOG_IF(WARNING, !kv.second->is_deletable())
- << "Still have non-deletable stream";
- }
}
void QuicSession::OnStreamFrame(const QuicStreamFrame& frame) {
@@ -142,9 +138,8 @@ void QuicSession::OnConnectionClosed(QuicErrorCode error,
// Cleanup zombie stream map on connection close.
while (!zombie_streams_.empty()) {
ZombieStreamMap::iterator it = zombie_streams_.begin();
- // Do not call OnConnectionClose as this may trigger unexpected operations
- // in subclass of QuicStream.
- it->second->SetIsDeletable(true);
+ closed_streams_.push_back(std::move(it->second));
+ zombie_streams_.erase(it);
}
if (visitor_) {
@@ -387,10 +382,10 @@ void QuicSession::CloseStreamInner(QuicStreamId stream_id, bool locally_reset) {
stream->set_rst_sent(true);
}
- if (stream->is_deletable()) {
- closed_streams_.push_back(std::move(it->second));
- } else {
+ if (stream->IsWaitingForAcks()) {
zombie_streams_[stream->id()] = std::move(it->second);
+ } else {
+ closed_streams_.push_back(std::move(it->second));
}
// If we haven't received a FIN or RST for this stream, we need to keep track
@@ -966,7 +961,7 @@ QuicStream* QuicSession::CreateAndActivateStream(QuicStreamId id) {
return stream_ptr;
}
-void QuicSession::MarkStreamDeletable(QuicStreamId id) {
+void QuicSession::OnStreamDoneWaitingForAcks(QuicStreamId id) {
auto it = zombie_streams_.find(id);
if (it == zombie_streams_.end()) {
return;
« no previous file with comments | « net/quic/core/quic_session.h ('k') | net/quic/core/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698