| OLD | NEW | 
|   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_flags.h" |   7 #include "net/quic/quic_flags.h" | 
|   8  |   8  | 
|   9 namespace net { |   9 namespace net { | 
|  10  |  10  | 
|  11 QuicClientSessionBase::QuicClientSessionBase( |  11 QuicClientSessionBase::QuicClientSessionBase( | 
|  12     QuicConnection* connection, |  12     QuicConnection* connection, | 
|  13     const QuicConfig& config, |  13     const QuicConfig& config) | 
|  14     bool is_secure) |  14     : QuicSession(connection, config) {} | 
|  15     : QuicSession(connection, config, is_secure) {} |  | 
|  16  |  15  | 
|  17 QuicClientSessionBase::~QuicClientSessionBase() {} |  16 QuicClientSessionBase::~QuicClientSessionBase() {} | 
|  18  |  17  | 
|  19 void QuicClientSessionBase::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { |  18 void QuicClientSessionBase::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { | 
|  20   QuicSession::OnCryptoHandshakeEvent(event); |  19   QuicSession::OnCryptoHandshakeEvent(event); | 
|  21   // Set FEC policy for streams immediately after sending CHLO and before any |  20   // Set FEC policy for streams immediately after sending CHLO and before any | 
|  22   // more data is sent. |  21   // more data is sent. | 
|  23   if (!FLAGS_enable_quic_fec || |  22   if (!FLAGS_enable_quic_fec || | 
|  24       event != ENCRYPTION_FIRST_ESTABLISHED || |  23       event != ENCRYPTION_FIRST_ESTABLISHED || | 
|  25       !config()->HasSendConnectionOptions() || |  24       !config()->HasSendConnectionOptions() || | 
|  26       !ContainsQuicTag(config()->SendConnectionOptions(), kFHDR)) { |  25       !ContainsQuicTag(config()->SendConnectionOptions(), kFHDR)) { | 
|  27     return; |  26     return; | 
|  28   } |  27   } | 
|  29   // kFHDR config maps to FEC protection always for headers stream. |  28   // kFHDR config maps to FEC protection always for headers stream. | 
|  30   // TODO(jri): Add crypto stream in addition to headers for kHDR. |  29   // TODO(jri): Add crypto stream in addition to headers for kHDR. | 
|  31   headers_stream_->set_fec_policy(FEC_PROTECT_ALWAYS); |  30   headers_stream_->set_fec_policy(FEC_PROTECT_ALWAYS); | 
|  32 } |  31 } | 
|  33  |  32  | 
|  34 }  // namespace net |  33 }  // namespace net | 
| OLD | NEW |