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

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

Issue 2751623002: Revert of Server push cancellation: add a finch trial parameter (patchset #14 id:280001 of https://… (Closed)
Patch Set: Created 3 years, 9 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.h ('k') | net/spdy/spdy_session_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_session.h" 5 #include "net/quic/core/quic_session.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 #include <utility> 8 #include <utility>
9 9
10 #include "net/quic/core/quic_connection.h" 10 #include "net/quic/core/quic_connection.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 void QuicSession::OnRstStream(const QuicRstStreamFrame& frame) { 90 void QuicSession::OnRstStream(const QuicRstStreamFrame& frame) {
91 if (QuicContainsKey(static_stream_map_, frame.stream_id)) { 91 if (QuicContainsKey(static_stream_map_, frame.stream_id)) {
92 connection()->CloseConnection( 92 connection()->CloseConnection(
93 QUIC_INVALID_STREAM_ID, "Attempt to reset a static stream", 93 QUIC_INVALID_STREAM_ID, "Attempt to reset a static stream",
94 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); 94 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
95 return; 95 return;
96 } 96 }
97 97
98 if (visitor_) {
99 visitor_->OnRstStreamReceived(frame);
100 }
101
102 QuicStream* stream = GetOrCreateDynamicStream(frame.stream_id); 98 QuicStream* stream = GetOrCreateDynamicStream(frame.stream_id);
103 if (!stream) { 99 if (!stream) {
104 HandleRstOnValidNonexistentStream(frame); 100 HandleRstOnValidNonexistentStream(frame);
105 return; // Errors are handled by GetOrCreateStream. 101 return; // Errors are handled by GetOrCreateStream.
106 } 102 }
107 103
108 stream->OnStreamReset(frame); 104 stream->OnStreamReset(frame);
109 } 105 }
110 106
111 void QuicSession::OnGoAway(const QuicGoAwayFrame& frame) { 107 void QuicSession::OnGoAway(const QuicGoAwayFrame& frame) {
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 866
871 size_t QuicSession::MaxAvailableStreams() const { 867 size_t QuicSession::MaxAvailableStreams() const {
872 return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier; 868 return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier;
873 } 869 }
874 870
875 bool QuicSession::IsIncomingStream(QuicStreamId id) const { 871 bool QuicSession::IsIncomingStream(QuicStreamId id) const {
876 return id % 2 != next_outgoing_stream_id_ % 2; 872 return id % 2 != next_outgoing_stream_id_ % 2;
877 } 873 }
878 874
879 } // namespace net 875 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_session.h ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698