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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 QuicClientSession::QuicClientSession( | 130 QuicClientSession::QuicClientSession( |
131 QuicConnection* connection, | 131 QuicConnection* connection, |
132 scoped_ptr<DatagramClientSocket> socket, | 132 scoped_ptr<DatagramClientSocket> socket, |
133 scoped_ptr<QuicDefaultPacketWriter> writer, | 133 scoped_ptr<QuicDefaultPacketWriter> writer, |
134 QuicStreamFactory* stream_factory, | 134 QuicStreamFactory* stream_factory, |
135 QuicCryptoClientStreamFactory* crypto_client_stream_factory, | 135 QuicCryptoClientStreamFactory* crypto_client_stream_factory, |
136 scoped_ptr<QuicServerInfo> server_info, | 136 scoped_ptr<QuicServerInfo> server_info, |
137 const QuicServerId& server_id, | 137 const QuicServerId& server_id, |
138 const QuicConfig& config, | 138 const QuicConfig& config, |
| 139 uint32 max_flow_control_receive_window_bytes, |
139 QuicCryptoClientConfig* crypto_config, | 140 QuicCryptoClientConfig* crypto_config, |
140 NetLog* net_log) | 141 NetLog* net_log) |
141 : QuicClientSessionBase(connection, config), | 142 : QuicClientSessionBase(connection, |
| 143 max_flow_control_receive_window_bytes, |
| 144 config), |
142 require_confirmation_(false), | 145 require_confirmation_(false), |
143 stream_factory_(stream_factory), | 146 stream_factory_(stream_factory), |
144 socket_(socket.Pass()), | 147 socket_(socket.Pass()), |
145 writer_(writer.Pass()), | 148 writer_(writer.Pass()), |
146 read_buffer_(new IOBufferWithSize(kMaxPacketSize)), | 149 read_buffer_(new IOBufferWithSize(kMaxPacketSize)), |
147 server_info_(server_info.Pass()), | 150 server_info_(server_info.Pass()), |
148 read_pending_(false), | 151 read_pending_(false), |
149 num_total_streams_(0), | 152 num_total_streams_(0), |
150 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), | 153 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), |
151 logger_(net_log_), | 154 logger_(net_log_), |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 RecordUnexpectedNotGoingAway(NOTIFY_FACTORY_OF_SESSION_CLOSED); | 756 RecordUnexpectedNotGoingAway(NOTIFY_FACTORY_OF_SESSION_CLOSED); |
754 | 757 |
755 going_away_ = true; | 758 going_away_ = true; |
756 DCHECK_EQ(0u, GetNumOpenStreams()); | 759 DCHECK_EQ(0u, GetNumOpenStreams()); |
757 // Will delete |this|. | 760 // Will delete |this|. |
758 if (stream_factory_) | 761 if (stream_factory_) |
759 stream_factory_->OnSessionClosed(this); | 762 stream_factory_->OnSessionClosed(this); |
760 } | 763 } |
761 | 764 |
762 } // namespace net | 765 } // namespace net |
OLD | NEW |