| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/quic/core/quic_spdy_session.h" | 5 #include "net/quic/core/quic_spdy_session.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 spdy_framer_.set_visitor(spdy_framer_visitor_.get()); | 353 spdy_framer_.set_visitor(spdy_framer_visitor_.get()); |
| 354 spdy_framer_.set_debug_visitor(spdy_framer_visitor_.get()); | 354 spdy_framer_.set_debug_visitor(spdy_framer_visitor_.get()); |
| 355 } | 355 } |
| 356 | 356 |
| 357 QuicSpdySession::~QuicSpdySession() { | 357 QuicSpdySession::~QuicSpdySession() { |
| 358 // Set the streams' session pointers in closed and dynamic stream lists | 358 // Set the streams' session pointers in closed and dynamic stream lists |
| 359 // to null to avoid subsequent use of this session. | 359 // to null to avoid subsequent use of this session. |
| 360 for (auto& stream : *closed_streams()) { | 360 for (auto& stream : *closed_streams()) { |
| 361 static_cast<QuicSpdyStream*>(stream.get())->ClearSession(); | 361 static_cast<QuicSpdyStream*>(stream.get())->ClearSession(); |
| 362 } | 362 } |
| 363 for (auto const& kv : zombie_streams()) { |
| 364 static_cast<QuicSpdyStream*>(kv.second.get())->ClearSession(); |
| 365 } |
| 363 for (auto const& kv : dynamic_streams()) { | 366 for (auto const& kv : dynamic_streams()) { |
| 364 static_cast<QuicSpdyStream*>(kv.second.get())->ClearSession(); | 367 static_cast<QuicSpdyStream*>(kv.second.get())->ClearSession(); |
| 365 } | 368 } |
| 366 } | 369 } |
| 367 | 370 |
| 368 void QuicSpdySession::Initialize() { | 371 void QuicSpdySession::Initialize() { |
| 369 QuicSession::Initialize(); | 372 QuicSession::Initialize(); |
| 370 | 373 |
| 371 if (perspective() == Perspective::IS_SERVER) { | 374 if (perspective() == Perspective::IS_SERVER) { |
| 372 set_largest_peer_created_stream_id(kHeadersStreamId); | 375 set_largest_peer_created_stream_id(kHeadersStreamId); |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 SpdyPriority priority) { | 816 SpdyPriority priority) { |
| 814 auto* stream = static_cast<QuicSpdyStream*>( | 817 auto* stream = static_cast<QuicSpdyStream*>( |
| 815 QuicSession::MaybeCreateOutgoingDynamicStream(priority)); | 818 QuicSession::MaybeCreateOutgoingDynamicStream(priority)); |
| 816 if (stream) { | 819 if (stream) { |
| 817 stream->SetPriority(priority); | 820 stream->SetPriority(priority); |
| 818 } | 821 } |
| 819 return stream; | 822 return stream; |
| 820 } | 823 } |
| 821 | 824 |
| 822 } // namespace net | 825 } // namespace net |
| OLD | NEW |