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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 ResetAndReturn(&callback_).Run(rv); | 148 ResetAndReturn(&callback_).Run(rv); |
149 } | 149 } |
150 | 150 |
151 QuicClientSession::QuicClientSession( | 151 QuicClientSession::QuicClientSession( |
152 QuicConnection* connection, | 152 QuicConnection* connection, |
153 scoped_ptr<DatagramClientSocket> socket, | 153 scoped_ptr<DatagramClientSocket> socket, |
154 QuicStreamFactory* stream_factory, | 154 QuicStreamFactory* stream_factory, |
155 TransportSecurityState* transport_security_state, | 155 TransportSecurityState* transport_security_state, |
156 scoped_ptr<QuicServerInfo> server_info, | 156 scoped_ptr<QuicServerInfo> server_info, |
157 const QuicConfig& config, | 157 const QuicConfig& config, |
| 158 bool is_secure, |
158 base::TaskRunner* task_runner, | 159 base::TaskRunner* task_runner, |
159 NetLog* net_log) | 160 NetLog* net_log) |
160 : QuicClientSessionBase(connection, config), | 161 : QuicClientSessionBase(connection, config, is_secure), |
161 require_confirmation_(false), | 162 require_confirmation_(false), |
162 stream_factory_(stream_factory), | 163 stream_factory_(stream_factory), |
163 socket_(socket.Pass()), | 164 socket_(socket.Pass()), |
164 read_buffer_(new IOBufferWithSize(kMaxPacketSize)), | 165 read_buffer_(new IOBufferWithSize(kMaxPacketSize)), |
165 transport_security_state_(transport_security_state), | 166 transport_security_state_(transport_security_state), |
166 server_info_(server_info.Pass()), | 167 server_info_(server_info.Pass()), |
167 read_pending_(false), | 168 read_pending_(false), |
168 num_total_streams_(0), | 169 num_total_streams_(0), |
169 task_runner_(task_runner), | 170 task_runner_(task_runner), |
170 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), | 171 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 return; | 887 return; |
887 | 888 |
888 // TODO(rch): re-enable this code once beta is cut. | 889 // TODO(rch): re-enable this code once beta is cut. |
889 // if (stream_factory_) | 890 // if (stream_factory_) |
890 // stream_factory_->OnSessionConnectTimeout(this); | 891 // stream_factory_->OnSessionConnectTimeout(this); |
891 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 892 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
892 // DCHECK_EQ(0u, GetNumOpenStreams()); | 893 // DCHECK_EQ(0u, GetNumOpenStreams()); |
893 } | 894 } |
894 | 895 |
895 } // namespace net | 896 } // namespace net |
OLD | NEW |