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

Side by Side Diff: net/quic/quic_client_session_base.cc

Issue 1766623002: Deprecate gfe2_reloadable_flag_enable_quic_fec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115603675
Patch Set: Update dependency Created 4 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 | « no previous file | net/quic/quic_flags.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/quic_client_session_base.h" 5 #include "net/quic/quic_client_session_base.h"
6 6
7 #include "net/quic/quic_client_promised_info.h" 7 #include "net/quic/quic_client_promised_info.h"
8 #include "net/quic/quic_flags.h" 8 #include "net/quic/quic_flags.h"
9 #include "net/quic/spdy_utils.h" 9 #include "net/quic/spdy_utils.h"
10 10
(...skipping 10 matching lines...) Expand all
21 QuicClientSessionBase::~QuicClientSessionBase() { 21 QuicClientSessionBase::~QuicClientSessionBase() {
22 // all promised streams for this session 22 // all promised streams for this session
23 for (auto& it : promised_by_id_) { 23 for (auto& it : promised_by_id_) {
24 DVLOG(1) << "erase stream " << it.first << " url " << it.second->url(); 24 DVLOG(1) << "erase stream " << it.first << " url " << it.second->url();
25 push_promise_index_->promised_by_url()->erase(it.second->url()); 25 push_promise_index_->promised_by_url()->erase(it.second->url());
26 } 26 }
27 } 27 }
28 28
29 void QuicClientSessionBase::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { 29 void QuicClientSessionBase::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) {
30 QuicSession::OnCryptoHandshakeEvent(event); 30 QuicSession::OnCryptoHandshakeEvent(event);
31 // Set FEC policy for streams immediately after sending CHLO and before any
32 // more data is sent.
33 if (!FLAGS_enable_quic_fec || event != ENCRYPTION_FIRST_ESTABLISHED ||
34 !config()->HasSendConnectionOptions() ||
35 !ContainsQuicTag(config()->SendConnectionOptions(), kFHDR)) {
36 return;
37 }
38 // kFHDR config maps to FEC protection always for headers stream.
39 // TODO(jri): Add crypto stream in addition to headers for kHDR.
40 headers_stream()->set_fec_policy(FEC_PROTECT_ALWAYS);
41 } 31 }
42 32
43 void QuicClientSessionBase::OnPromiseHeaders(QuicStreamId stream_id, 33 void QuicClientSessionBase::OnPromiseHeaders(QuicStreamId stream_id,
44 StringPiece headers_data) { 34 StringPiece headers_data) {
45 QuicSpdyStream* stream = GetSpdyDataStream(stream_id); 35 QuicSpdyStream* stream = GetSpdyDataStream(stream_id);
46 if (!stream) { 36 if (!stream) {
47 // It's quite possible to receive headers after a stream has been reset. 37 // It's quite possible to receive headers after a stream has been reset.
48 return; 38 return;
49 } 39 }
50 stream->OnPromiseHeaders(headers_data); 40 stream->OnPromiseHeaders(headers_data);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 void QuicClientSessionBase::ResetPromised(QuicStreamId id, 163 void QuicClientSessionBase::ResetPromised(QuicStreamId id,
174 QuicRstStreamErrorCode error_code) { 164 QuicRstStreamErrorCode error_code) {
175 SendRstStream(id, error_code, 0); 165 SendRstStream(id, error_code, 0);
176 if (!IsOpenStream(id)) { 166 if (!IsOpenStream(id)) {
177 MaybeIncreaseLargestPeerStreamId(id); 167 MaybeIncreaseLargestPeerStreamId(id);
178 InsertLocallyClosedStreamsHighestOffset(id, 0); 168 InsertLocallyClosedStreamsHighestOffset(id, 0);
179 } 169 }
180 } 170 }
181 171
182 } // namespace net 172 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698