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

Side by Side Diff: net/quic/core/quic_spdy_session.cc

Issue 2915873003: This QUIC change includes: (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_session_test.cc ('k') | net/quic/core/quic_spdy_stream_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/quic/core/quic_session_test.cc ('k') | net/quic/core/quic_spdy_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698