| 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/tools/quic/quic_reliable_client_stream.h" | 9 #include "net/tools/quic/quic_reliable_client_stream.h" |
| 10 #include "net/tools/quic/quic_spdy_client_stream.h" | 10 #include "net/tools/quic/quic_spdy_client_stream.h" |
| 11 | 11 |
| 12 using std::string; | 12 using std::string; |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 namespace tools { | 15 namespace tools { |
| 16 | 16 |
| 17 QuicClientSession::QuicClientSession( | 17 QuicClientSession::QuicClientSession( |
| 18 const string& server_hostname, | 18 const string& server_hostname, |
| 19 QuicConnection* connection) | 19 const QuicConfig& config, |
| 20 QuicConnection* connection, |
| 21 QuicCryptoClientConfig* crypto_config) |
| 20 : QuicSession(connection, false), | 22 : QuicSession(connection, false), |
| 21 crypto_stream_(this, server_hostname) { | 23 crypto_stream_(server_hostname, config, this, crypto_config) { |
| 22 } | 24 } |
| 23 | 25 |
| 24 QuicClientSession::~QuicClientSession() { | 26 QuicClientSession::~QuicClientSession() { |
| 25 } | 27 } |
| 26 | 28 |
| 27 QuicReliableClientStream* QuicClientSession::CreateOutgoingReliableStream() { | 29 QuicReliableClientStream* QuicClientSession::CreateOutgoingReliableStream() { |
| 28 if (!crypto_stream_.handshake_complete()) { | 30 if (!crypto_stream_.handshake_complete()) { |
| 29 DLOG(INFO) << "Crypto handshake not complete, no outgoing stream created."; | 31 DLOG(INFO) << "Crypto handshake not complete, no outgoing stream created."; |
| 30 return NULL; | 32 return NULL; |
| 31 } | 33 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 54 } | 56 } |
| 55 | 57 |
| 56 ReliableQuicStream* QuicClientSession::CreateIncomingReliableStream( | 58 ReliableQuicStream* QuicClientSession::CreateIncomingReliableStream( |
| 57 QuicStreamId id) { | 59 QuicStreamId id) { |
| 58 DLOG(ERROR) << "Server push not supported"; | 60 DLOG(ERROR) << "Server push not supported"; |
| 59 return NULL; | 61 return NULL; |
| 60 } | 62 } |
| 61 | 63 |
| 62 } // namespace tools | 64 } // namespace tools |
| 63 } // namespace net | 65 } // namespace net |
| OLD | NEW |