| 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_); |
| 671 } | 672 } |
| 672 | 673 |
| 673 void QuicClientSession::StartReading() { | 674 void QuicClientSession::StartReading() { |
| 674 if (read_pending_) { | 675 if (read_pending_) { |
| 675 return; | 676 return; |
| 676 } | 677 } |
| 677 read_pending_ = true; | 678 read_pending_ = true; |
| 678 int rv = socket_->Read(read_buffer_.get(), | 679 int rv = socket_->Read(read_buffer_.get(), |
| 679 read_buffer_->size(), | 680 read_buffer_->size(), |
| 680 base::Bind(&QuicClientSession::OnReadComplete, | 681 base::Bind(&QuicClientSession::OnReadComplete, |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 return; | 851 return; |
| 851 | 852 |
| 852 // TODO(rch): re-enable this code once beta is cut. | 853 // TODO(rch): re-enable this code once beta is cut. |
| 853 // if (stream_factory_) | 854 // if (stream_factory_) |
| 854 // stream_factory_->OnSessionConnectTimeout(this); | 855 // stream_factory_->OnSessionConnectTimeout(this); |
| 855 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 856 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
| 856 // DCHECK_EQ(0u, GetNumOpenStreams()); | 857 // DCHECK_EQ(0u, GetNumOpenStreams()); |
| 857 } | 858 } |
| 858 | 859 |
| 859 } // namespace net | 860 } // namespace net |
| OLD | NEW |