| 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/tools/quic/quic_client_session.h" | 5 #include "net/tools/quic/quic_client_session.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/quic/crypto/crypto_protocol.h" | 8 #include "net/quic/crypto/crypto_protocol.h" |
| 9 #include "net/quic/crypto/proof_verifier_chromium.h" | 9 #include "net/quic/crypto/proof_verifier_chromium.h" |
| 10 #include "net/quic/quic_server_id.h" | 10 #include "net/quic/quic_server_id.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 QuicClientSession::~QuicClientSession() {} | 28 QuicClientSession::~QuicClientSession() {} |
| 29 | 29 |
| 30 void QuicClientSession::Initialize() { | 30 void QuicClientSession::Initialize() { |
| 31 crypto_stream_.reset(CreateQuicCryptoStream()); | 31 crypto_stream_.reset(CreateQuicCryptoStream()); |
| 32 QuicClientSessionBase::Initialize(); | 32 QuicClientSessionBase::Initialize(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 void QuicClientSession::OnProofValid( | 35 void QuicClientSession::OnProofValid( |
| 36 const QuicCryptoClientConfig::CachedState& /*cached*/) {} | 36 const QuicCryptoClientConfig::CachedState& /*cached*/) {} |
| 37 | 37 |
| 38 void QuicClientSession::OnChannelValid() {} |
| 39 |
| 38 void QuicClientSession::OnProofVerifyDetailsAvailable( | 40 void QuicClientSession::OnProofVerifyDetailsAvailable( |
| 39 const ProofVerifyDetails& /*verify_details*/) {} | 41 const ProofVerifyDetails& /*verify_details*/) {} |
| 40 | 42 |
| 41 bool QuicClientSession::ShouldCreateOutgoingDynamicStream() { | 43 bool QuicClientSession::ShouldCreateOutgoingDynamicStream() { |
| 42 if (!crypto_stream_->encryption_established()) { | 44 if (!crypto_stream_->encryption_established()) { |
| 43 DVLOG(1) << "Encryption not active so no outgoing stream created."; | 45 DVLOG(1) << "Encryption not active so no outgoing stream created."; |
| 44 return false; | 46 return false; |
| 45 } | 47 } |
| 46 if (GetNumOpenOutgoingStreams() >= max_open_outgoing_streams()) { | 48 if (GetNumOpenOutgoingStreams() >= max_open_outgoing_streams()) { |
| 47 DVLOG(1) << "Failed to create a new outgoing stream. " | 49 DVLOG(1) << "Failed to create a new outgoing stream. " |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 return new QuicCryptoClientStream( | 125 return new QuicCryptoClientStream( |
| 124 server_id_, this, new ProofVerifyContextChromium(0, BoundNetLog()), | 126 server_id_, this, new ProofVerifyContextChromium(0, BoundNetLog()), |
| 125 crypto_config_, this); | 127 crypto_config_, this); |
| 126 } | 128 } |
| 127 | 129 |
| 128 bool QuicClientSession::IsAuthorized(const string& authority) { | 130 bool QuicClientSession::IsAuthorized(const string& authority) { |
| 129 return true; | 131 return true; |
| 130 } | 132 } |
| 131 | 133 |
| 132 } // namespace net | 134 } // namespace net |
| OLD | NEW |