Chromium Code Reviews| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 num_packets_read_(0), | 157 num_packets_read_(0), |
| 158 going_away_(false), | 158 going_away_(false), |
| 159 weak_factory_(this) { | 159 weak_factory_(this) { |
| 160 connection->set_debug_visitor(logger_); | 160 connection->set_debug_visitor(logger_); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void QuicClientSession::InitializeSession( | 163 void QuicClientSession::InitializeSession( |
| 164 const QuicServerId& server_id, | 164 const QuicServerId& server_id, |
| 165 QuicCryptoClientConfig* crypto_config, | 165 QuicCryptoClientConfig* crypto_config, |
| 166 QuicCryptoClientStreamFactory* crypto_client_stream_factory) { | 166 QuicCryptoClientStreamFactory* crypto_client_stream_factory) { |
| 167 server_host_port_.reset(new HostPortPair(server_id.host_port_pair())); | 167 server_host_port_ = HostPortPair(server_id.host_port_pair()); |
|
wtc
2014/08/27 22:15:03
This should say:
server_host_port_ = server_id.h
ramant (doing other things)
2014/08/27 22:24:56
Done.
| |
| 168 crypto_stream_.reset( | 168 crypto_stream_.reset( |
| 169 crypto_client_stream_factory ? | 169 crypto_client_stream_factory ? |
| 170 crypto_client_stream_factory->CreateQuicCryptoClientStream( | 170 crypto_client_stream_factory->CreateQuicCryptoClientStream( |
| 171 server_id, this, crypto_config) : | 171 server_id, this, crypto_config) : |
| 172 new QuicCryptoClientStream(server_id, this, | 172 new QuicCryptoClientStream(server_id, this, |
| 173 new ProofVerifyContextChromium(net_log_), | 173 new ProofVerifyContextChromium(net_log_), |
| 174 crypto_config)); | 174 crypto_config)); |
| 175 QuicClientSessionBase::InitializeSession(); | 175 QuicClientSessionBase::InitializeSession(); |
| 176 // TODO(rch): pass in full host port proxy pair | 176 // TODO(rch): pass in full host port proxy pair |
| 177 net_log_.BeginEvent( | 177 net_log_.BeginEvent( |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 497 | 497 |
| 498 bool QuicClientSession::CanPool(const std::string& hostname) const { | 498 bool QuicClientSession::CanPool(const std::string& hostname) const { |
| 499 DCHECK(connection()->connected()); | 499 DCHECK(connection()->connected()); |
| 500 SSLInfo ssl_info; | 500 SSLInfo ssl_info; |
| 501 if (!GetSSLInfo(&ssl_info) || !ssl_info.cert.get()) { | 501 if (!GetSSLInfo(&ssl_info) || !ssl_info.cert.get()) { |
| 502 // We can always pool with insecure QUIC sessions. | 502 // We can always pool with insecure QUIC sessions. |
| 503 return true; | 503 return true; |
| 504 } | 504 } |
| 505 | 505 |
| 506 return SpdySession::CanPool(transport_security_state_, ssl_info, | 506 return SpdySession::CanPool(transport_security_state_, ssl_info, |
| 507 server_host_port_->host(), hostname); | 507 server_host_port_.host(), hostname); |
| 508 } | 508 } |
| 509 | 509 |
| 510 QuicDataStream* QuicClientSession::CreateIncomingDataStream( | 510 QuicDataStream* QuicClientSession::CreateIncomingDataStream( |
| 511 QuicStreamId id) { | 511 QuicStreamId id) { |
| 512 DLOG(ERROR) << "Server push not supported"; | 512 DLOG(ERROR) << "Server push not supported"; |
| 513 return NULL; | 513 return NULL; |
| 514 } | 514 } |
| 515 | 515 |
| 516 void QuicClientSession::CloseStream(QuicStreamId stream_id) { | 516 void QuicClientSession::CloseStream(QuicStreamId stream_id) { |
| 517 ReliableQuicStream* stream = GetStream(stream_id); | 517 ReliableQuicStream* stream = GetStream(stream_id); |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 863 return; | 863 return; |
| 864 | 864 |
| 865 // TODO(rch): re-enable this code once beta is cut. | 865 // TODO(rch): re-enable this code once beta is cut. |
| 866 // if (stream_factory_) | 866 // if (stream_factory_) |
| 867 // stream_factory_->OnSessionConnectTimeout(this); | 867 // stream_factory_->OnSessionConnectTimeout(this); |
| 868 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 868 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
| 869 // DCHECK_EQ(0u, GetNumOpenStreams()); | 869 // DCHECK_EQ(0u, GetNumOpenStreams()); |
| 870 } | 870 } |
| 871 | 871 |
| 872 } // namespace net | 872 } // namespace net |
| OLD | NEW |