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 "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/profiler/scoped_tracker.h" | 8 #include "base/profiler/scoped_tracker.h" |
9 #include "net/quic/crypto/crypto_protocol.h" | 9 #include "net/quic/crypto/crypto_protocol.h" |
10 #include "net/quic/crypto/crypto_utils.h" | 10 #include "net/quic/crypto/crypto_utils.h" |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 432 |
433 void QuicCryptoClientStream::DoVerifyProofComplete( | 433 void QuicCryptoClientStream::DoVerifyProofComplete( |
434 QuicCryptoClientConfig::CachedState* cached) { | 434 QuicCryptoClientConfig::CachedState* cached) { |
435 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. | 435 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. |
436 tracked_objects::ScopedTracker tracking_profile( | 436 tracked_objects::ScopedTracker tracking_profile( |
437 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 437 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
438 "422516 QuicCryptoClientStream::DoVerifyProofComplete")); | 438 "422516 QuicCryptoClientStream::DoVerifyProofComplete")); |
439 | 439 |
440 if (!verify_ok_) { | 440 if (!verify_ok_) { |
441 next_state_ = STATE_NONE; | 441 next_state_ = STATE_NONE; |
442 client_session()->OnProofVerifyDetailsAvailable(*verify_details_); | 442 if (verify_details_) { |
| 443 client_session()->OnProofVerifyDetailsAvailable(*verify_details_); |
| 444 } |
443 UMA_HISTOGRAM_BOOLEAN("Net.QuicVerifyProofFailed.HandshakeConfirmed", | 445 UMA_HISTOGRAM_BOOLEAN("Net.QuicVerifyProofFailed.HandshakeConfirmed", |
444 handshake_confirmed()); | 446 handshake_confirmed()); |
445 CloseConnectionWithDetails( | 447 CloseConnectionWithDetails( |
446 QUIC_PROOF_INVALID, "Proof invalid: " + verify_error_details_); | 448 QUIC_PROOF_INVALID, "Proof invalid: " + verify_error_details_); |
447 return; | 449 return; |
448 } | 450 } |
449 | 451 |
450 // Check if generation_counter has changed between STATE_VERIFY_PROOF and | 452 // Check if generation_counter has changed between STATE_VERIFY_PROOF and |
451 // STATE_VERIFY_PROOF_COMPLETE state changes. | 453 // STATE_VERIFY_PROOF_COMPLETE state changes. |
452 if (generation_counter_ != cached->generation_counter()) { | 454 if (generation_counter_ != cached->generation_counter()) { |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 } | 647 } |
646 } | 648 } |
647 return false; | 649 return false; |
648 } | 650 } |
649 | 651 |
650 QuicClientSessionBase* QuicCryptoClientStream::client_session() { | 652 QuicClientSessionBase* QuicCryptoClientStream::client_session() { |
651 return reinterpret_cast<QuicClientSessionBase*>(session()); | 653 return reinterpret_cast<QuicClientSessionBase*>(session()); |
652 } | 654 } |
653 | 655 |
654 } // namespace net | 656 } // namespace net |
OLD | NEW |