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_client_session.h" | 5 #include "net/quic/quic_client_session.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 } | 661 } |
662 | 662 |
663 void QuicClientSession::OnProofVerifyDetailsAvailable( | 663 void QuicClientSession::OnProofVerifyDetailsAvailable( |
664 const ProofVerifyDetails& verify_details) { | 664 const ProofVerifyDetails& verify_details) { |
665 const CertVerifyResult* cert_verify_result_other = | 665 const CertVerifyResult* cert_verify_result_other = |
666 &(reinterpret_cast<const ProofVerifyDetailsChromium*>( | 666 &(reinterpret_cast<const ProofVerifyDetailsChromium*>( |
667 &verify_details))->cert_verify_result; | 667 &verify_details))->cert_verify_result; |
668 CertVerifyResult* result_copy = new CertVerifyResult; | 668 CertVerifyResult* result_copy = new CertVerifyResult; |
669 result_copy->CopyFrom(*cert_verify_result_other); | 669 result_copy->CopyFrom(*cert_verify_result_other); |
670 cert_verify_result_.reset(result_copy); | 670 cert_verify_result_.reset(result_copy); |
671 logger_.OnCertificateVerified(*cert_verify_result_); | |
672 } | 671 } |
673 | 672 |
674 void QuicClientSession::StartReading() { | 673 void QuicClientSession::StartReading() { |
675 if (read_pending_) { | 674 if (read_pending_) { |
676 return; | 675 return; |
677 } | 676 } |
678 read_pending_ = true; | 677 read_pending_ = true; |
679 int rv = socket_->Read(read_buffer_.get(), | 678 int rv = socket_->Read(read_buffer_.get(), |
680 read_buffer_->size(), | 679 read_buffer_->size(), |
681 base::Bind(&QuicClientSession::OnReadComplete, | 680 base::Bind(&QuicClientSession::OnReadComplete, |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 return; | 850 return; |
852 | 851 |
853 // TODO(rch): re-enable this code once beta is cut. | 852 // TODO(rch): re-enable this code once beta is cut. |
854 // if (stream_factory_) | 853 // if (stream_factory_) |
855 // stream_factory_->OnSessionConnectTimeout(this); | 854 // stream_factory_->OnSessionConnectTimeout(this); |
856 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 855 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
857 // DCHECK_EQ(0u, GetNumOpenStreams()); | 856 // DCHECK_EQ(0u, GetNumOpenStreams()); |
858 } | 857 } |
859 | 858 |
860 } // namespace net | 859 } // namespace net |
OLD | NEW |