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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 &crypto_negotiated_params_, | 231 &crypto_negotiated_params_, |
232 &out, | 232 &out, |
233 &error_details); | 233 &error_details); |
234 if (error != QUIC_NO_ERROR) { | 234 if (error != QUIC_NO_ERROR) { |
235 // Flush the cached config so that, if it's bad, the server has a | 235 // Flush the cached config so that, if it's bad, the server has a |
236 // chance to send us another in the future. | 236 // chance to send us another in the future. |
237 cached->InvalidateServerConfig(); | 237 cached->InvalidateServerConfig(); |
238 CloseConnectionWithDetails(error, error_details); | 238 CloseConnectionWithDetails(error, error_details); |
239 return; | 239 return; |
240 } | 240 } |
241 channel_id_sent_ = (channel_id_key_.get() != NULL); | 241 // TODO(wtc): a temporary change to measure the performance penalty of |
| 242 // pooling connections less often if channel ID is used. |
| 243 // channel_id_sent_ = (channel_id_key_.get() != NULL); |
242 if (cached->proof_verify_details()) { | 244 if (cached->proof_verify_details()) { |
243 client_session()->OnProofVerifyDetailsAvailable( | 245 client_session()->OnProofVerifyDetailsAvailable( |
244 *cached->proof_verify_details()); | 246 *cached->proof_verify_details()); |
245 } | 247 } |
246 next_state_ = STATE_RECV_SHLO; | 248 next_state_ = STATE_RECV_SHLO; |
247 DVLOG(1) << "Client: Sending " << out.DebugString(); | 249 DVLOG(1) << "Client: Sending " << out.DebugString(); |
248 SendHandshakeMessage(out); | 250 SendHandshakeMessage(out); |
249 // Be prepared to decrypt with the new server write key. | 251 // Be prepared to decrypt with the new server write key. |
250 session()->connection()->SetAlternativeDecrypter( | 252 session()->connection()->SetAlternativeDecrypter( |
251 crypto_negotiated_params_.initial_crypters.decrypter.release(), | 253 crypto_negotiated_params_.initial_crypters.decrypter.release(), |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 } | 494 } |
493 } | 495 } |
494 return false; | 496 return false; |
495 } | 497 } |
496 | 498 |
497 QuicClientSessionBase* QuicCryptoClientStream::client_session() { | 499 QuicClientSessionBase* QuicCryptoClientStream::client_session() { |
498 return reinterpret_cast<QuicClientSessionBase*>(session()); | 500 return reinterpret_cast<QuicClientSessionBase*>(session()); |
499 } | 501 } |
500 | 502 |
501 } // namespace net | 503 } // namespace net |
OLD | NEW |