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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 void QuicClientSession::StreamRequest::OnRequestCompleteFailure(int rv) { | 80 void QuicClientSession::StreamRequest::OnRequestCompleteFailure(int rv) { |
81 session_.reset(); | 81 session_.reset(); |
82 ResetAndReturn(&callback_).Run(rv); | 82 ResetAndReturn(&callback_).Run(rv); |
83 } | 83 } |
84 | 84 |
85 QuicClientSession::QuicClientSession( | 85 QuicClientSession::QuicClientSession( |
86 QuicConnection* connection, | 86 QuicConnection* connection, |
87 scoped_ptr<DatagramClientSocket> socket, | 87 scoped_ptr<DatagramClientSocket> socket, |
88 scoped_ptr<QuicDefaultPacketWriter> writer, | 88 scoped_ptr<QuicDefaultPacketWriter> writer, |
89 QuicStreamFactory* stream_factory, | 89 QuicStreamFactory* stream_factory, |
| 90 QuicCryptoClientStreamFactory* crypto_client_stream_factory, |
90 scoped_ptr<QuicServerInfo> server_info, | 91 scoped_ptr<QuicServerInfo> server_info, |
91 QuicCryptoClientStreamFactory* crypto_client_stream_factory, | |
92 const QuicSessionKey& server_key, | 92 const QuicSessionKey& server_key, |
93 const QuicConfig& config, | 93 const QuicConfig& config, |
94 QuicCryptoClientConfig* crypto_config, | 94 QuicCryptoClientConfig* crypto_config, |
95 NetLog* net_log) | 95 NetLog* net_log) |
96 : QuicSession(connection, config), | 96 : QuicSession(connection, config), |
97 require_confirmation_(false), | 97 require_confirmation_(false), |
98 stream_factory_(stream_factory), | 98 stream_factory_(stream_factory), |
99 socket_(socket.Pass()), | 99 socket_(socket.Pass()), |
100 writer_(writer.Pass()), | 100 writer_(writer.Pass()), |
101 read_buffer_(new IOBufferWithSize(kMaxPacketSize)), | 101 read_buffer_(new IOBufferWithSize(kMaxPacketSize)), |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 } | 572 } |
573 | 573 |
574 void QuicClientSession::NotifyFactoryOfSessionClosed() { | 574 void QuicClientSession::NotifyFactoryOfSessionClosed() { |
575 DCHECK_EQ(0u, GetNumOpenStreams()); | 575 DCHECK_EQ(0u, GetNumOpenStreams()); |
576 // Will delete |this|. | 576 // Will delete |this|. |
577 if (stream_factory_) | 577 if (stream_factory_) |
578 stream_factory_->OnSessionClosed(this); | 578 stream_factory_->OnSessionClosed(this); |
579 } | 579 } |
580 | 580 |
581 } // namespace net | 581 } // namespace net |
OLD | NEW |