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
3 // found in the LICENSE file.
5 #include "net/quic/quic_client_session_base.h"
7 #include "net/quic/quic_flags.h"
11 QuicClientSessionBase::QuicClientSessionBase(QuicConnection
* connection
,
12 const QuicConfig
& config
)
13 : QuicSpdySession(connection
, config
) {
16 QuicClientSessionBase::~QuicClientSessionBase() {}
18 void QuicClientSessionBase::OnCryptoHandshakeEvent(CryptoHandshakeEvent event
) {
19 QuicSession::OnCryptoHandshakeEvent(event
);
20 // Set FEC policy for streams immediately after sending CHLO and before any
22 if (!FLAGS_enable_quic_fec
||
23 event
!= ENCRYPTION_FIRST_ESTABLISHED
||
24 !config()->HasSendConnectionOptions() ||
25 !ContainsQuicTag(config()->SendConnectionOptions(), kFHDR
)) {
28 // kFHDR config maps to FEC protection always for headers stream.
29 // TODO(jri): Add crypto stream in addition to headers for kHDR.
30 headers_stream()->set_fec_policy(FEC_PROTECT_ALWAYS
);