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_chromium_client_session.h" | 5 #include "net/quic/quic_chromium_client_session.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 QuicCryptoClientStreamFactory* crypto_client_stream_factory, | 163 QuicCryptoClientStreamFactory* crypto_client_stream_factory, |
164 TransportSecurityState* transport_security_state, | 164 TransportSecurityState* transport_security_state, |
165 scoped_ptr<QuicServerInfo> server_info, | 165 scoped_ptr<QuicServerInfo> server_info, |
166 const QuicServerId& server_id, | 166 const QuicServerId& server_id, |
167 int cert_verify_flags, | 167 int cert_verify_flags, |
168 const QuicConfig& config, | 168 const QuicConfig& config, |
169 QuicCryptoClientConfig* crypto_config, | 169 QuicCryptoClientConfig* crypto_config, |
170 const char* const connection_description, | 170 const char* const connection_description, |
171 base::TimeTicks dns_resolution_end_time, | 171 base::TimeTicks dns_resolution_end_time, |
172 base::TaskRunner* task_runner, | 172 base::TaskRunner* task_runner, |
| 173 scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher, |
173 NetLog* net_log) | 174 NetLog* net_log) |
174 : QuicClientSessionBase(connection, config), | 175 : QuicClientSessionBase(connection, config), |
175 server_id_(server_id), | 176 server_id_(server_id), |
176 require_confirmation_(false), | 177 require_confirmation_(false), |
177 stream_factory_(stream_factory), | 178 stream_factory_(stream_factory), |
178 socket_(socket.Pass()), | 179 socket_(socket.Pass()), |
179 transport_security_state_(transport_security_state), | 180 transport_security_state_(transport_security_state), |
180 server_info_(server_info.Pass()), | 181 server_info_(server_info.Pass()), |
181 num_total_streams_(0), | 182 num_total_streams_(0), |
182 task_runner_(task_runner), | 183 task_runner_(task_runner), |
183 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), | 184 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), |
184 packet_reader_(socket_.get(), this, net_log_), | 185 packet_reader_(socket_.get(), this, net_log_), |
185 dns_resolution_end_time_(dns_resolution_end_time), | 186 dns_resolution_end_time_(dns_resolution_end_time), |
186 logger_(new QuicConnectionLogger(this, connection_description, net_log_)), | 187 logger_(new QuicConnectionLogger(this, |
| 188 connection_description, |
| 189 socket_performance_watcher.Pass(), |
| 190 net_log_)), |
187 going_away_(false), | 191 going_away_(false), |
188 disabled_reason_(QUIC_DISABLED_NOT), | 192 disabled_reason_(QUIC_DISABLED_NOT), |
189 weak_factory_(this) { | 193 weak_factory_(this) { |
190 crypto_stream_.reset( | 194 crypto_stream_.reset( |
191 crypto_client_stream_factory | 195 crypto_client_stream_factory |
192 ? crypto_client_stream_factory->CreateQuicCryptoClientStream( | 196 ? crypto_client_stream_factory->CreateQuicCryptoClientStream( |
193 server_id, this, crypto_config) | 197 server_id, this, crypto_config) |
194 : new QuicCryptoClientStream( | 198 : new QuicCryptoClientStream( |
195 server_id, this, | 199 server_id, this, |
196 new ProofVerifyContextChromium(cert_verify_flags, net_log_), | 200 new ProofVerifyContextChromium(cert_verify_flags, net_log_), |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 return; | 951 return; |
948 | 952 |
949 // TODO(rch): re-enable this code once beta is cut. | 953 // TODO(rch): re-enable this code once beta is cut. |
950 // if (stream_factory_) | 954 // if (stream_factory_) |
951 // stream_factory_->OnSessionConnectTimeout(this); | 955 // stream_factory_->OnSessionConnectTimeout(this); |
952 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 956 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
953 // DCHECK_EQ(0u, GetNumOpenStreams()); | 957 // DCHECK_EQ(0u, GetNumOpenStreams()); |
954 } | 958 } |
955 | 959 |
956 } // namespace net | 960 } // namespace net |
OLD | NEW |