| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 QuicClientSession::QuicClientSession( | 83 QuicClientSession::QuicClientSession( |
| 84 QuicConnection* connection, | 84 QuicConnection* connection, |
| 85 scoped_ptr<DatagramClientSocket> socket, | 85 scoped_ptr<DatagramClientSocket> socket, |
| 86 scoped_ptr<QuicDefaultPacketWriter> writer, | 86 scoped_ptr<QuicDefaultPacketWriter> writer, |
| 87 QuicStreamFactory* stream_factory, | 87 QuicStreamFactory* stream_factory, |
| 88 QuicCryptoClientStreamFactory* crypto_client_stream_factory, | 88 QuicCryptoClientStreamFactory* crypto_client_stream_factory, |
| 89 const string& server_hostname, | 89 const string& server_hostname, |
| 90 const QuicConfig& config, | 90 const QuicConfig& config, |
| 91 QuicCryptoClientConfig* crypto_config, | 91 QuicCryptoClientConfig* crypto_config, |
| 92 NetLog* net_log) | 92 NetLog* net_log) |
| 93 : QuicSession(connection, config, false), | 93 : QuicSession(connection, config), |
| 94 require_confirmation_(false), | 94 require_confirmation_(false), |
| 95 stream_factory_(stream_factory), | 95 stream_factory_(stream_factory), |
| 96 socket_(socket.Pass()), | 96 socket_(socket.Pass()), |
| 97 writer_(writer.Pass()), | 97 writer_(writer.Pass()), |
| 98 read_buffer_(new IOBufferWithSize(kMaxPacketSize)), | 98 read_buffer_(new IOBufferWithSize(kMaxPacketSize)), |
| 99 read_pending_(false), | 99 read_pending_(false), |
| 100 num_total_streams_(0), | 100 num_total_streams_(0), |
| 101 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), | 101 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), |
| 102 logger_(net_log_), | 102 logger_(net_log_), |
| 103 num_packets_read_(0), | 103 num_packets_read_(0), |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 } | 513 } |
| 514 | 514 |
| 515 void QuicClientSession::NotifyFactoryOfSessionClosed() { | 515 void QuicClientSession::NotifyFactoryOfSessionClosed() { |
| 516 DCHECK_EQ(0u, GetNumOpenStreams()); | 516 DCHECK_EQ(0u, GetNumOpenStreams()); |
| 517 // Will delete |this|. | 517 // Will delete |this|. |
| 518 if (stream_factory_) | 518 if (stream_factory_) |
| 519 stream_factory_->OnSessionClosed(this); | 519 stream_factory_->OnSessionClosed(this); |
| 520 } | 520 } |
| 521 | 521 |
| 522 } // namespace net | 522 } // namespace net |
| OLD | NEW |