OLD | NEW |
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/quic_crypto_client_stream.h" | 5 #include "net/quic/quic_crypto_client_stream.h" |
6 | 6 |
7 #include "net/quic/crypto/crypto_protocol.h" | 7 #include "net/quic/crypto/crypto_protocol.h" |
8 #include "net/quic/crypto/crypto_utils.h" | 8 #include "net/quic/crypto/crypto_utils.h" |
9 #include "net/quic/crypto/null_encrypter.h" | 9 #include "net/quic/crypto/null_encrypter.h" |
10 #include "net/quic/quic_client_session_base.h" | 10 #include "net/quic/quic_client_session_base.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 &crypto_negotiated_params_, | 238 &crypto_negotiated_params_, |
239 &out, | 239 &out, |
240 &error_details); | 240 &error_details); |
241 if (error != QUIC_NO_ERROR) { | 241 if (error != QUIC_NO_ERROR) { |
242 // Flush the cached config so that, if it's bad, the server has a | 242 // Flush the cached config so that, if it's bad, the server has a |
243 // chance to send us another in the future. | 243 // chance to send us another in the future. |
244 cached->InvalidateServerConfig(); | 244 cached->InvalidateServerConfig(); |
245 CloseConnectionWithDetails(error, error_details); | 245 CloseConnectionWithDetails(error, error_details); |
246 return; | 246 return; |
247 } | 247 } |
248 // TODO(wtc): a temporary change to measure the performance penalty of | 248 channel_id_sent_ = (channel_id_key_.get() != NULL); |
249 // pooling connections less often if channel ID is used. | |
250 // channel_id_sent_ = (channel_id_key_.get() != NULL); | |
251 if (cached->proof_verify_details()) { | 249 if (cached->proof_verify_details()) { |
252 client_session()->OnProofVerifyDetailsAvailable( | 250 client_session()->OnProofVerifyDetailsAvailable( |
253 *cached->proof_verify_details()); | 251 *cached->proof_verify_details()); |
254 } | 252 } |
255 next_state_ = STATE_RECV_SHLO; | 253 next_state_ = STATE_RECV_SHLO; |
256 SendHandshakeMessage(out); | 254 SendHandshakeMessage(out); |
257 // Be prepared to decrypt with the new server write key. | 255 // Be prepared to decrypt with the new server write key. |
258 session()->connection()->SetAlternativeDecrypter( | 256 session()->connection()->SetAlternativeDecrypter( |
259 crypto_negotiated_params_.initial_crypters.decrypter.release(), | 257 crypto_negotiated_params_.initial_crypters.decrypter.release(), |
260 ENCRYPTION_INITIAL, | 258 ENCRYPTION_INITIAL, |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 } | 503 } |
506 } | 504 } |
507 return false; | 505 return false; |
508 } | 506 } |
509 | 507 |
510 QuicClientSessionBase* QuicCryptoClientStream::client_session() { | 508 QuicClientSessionBase* QuicCryptoClientStream::client_session() { |
511 return reinterpret_cast<QuicClientSessionBase*>(session()); | 509 return reinterpret_cast<QuicClientSessionBase*>(session()); |
512 } | 510 } |
513 | 511 |
514 } // namespace net | 512 } // namespace net |
OLD | NEW |