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 // A client specific QuicSession subclass. This class owns the underlying | 5 // A client specific QuicSession subclass. This class owns the underlying |
6 // QuicConnection and QuicConnectionHelper objects. The connection stores | 6 // QuicConnection and QuicConnectionHelper objects. The connection stores |
7 // a non-owning pointer to the helper so this session needs to ensure that | 7 // a non-owning pointer to the helper so this session needs to ensure that |
8 // the helper outlives the connection. | 8 // the helper outlives the connection. |
9 | 9 |
10 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_ | 10 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_ |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 friend class test::QuicClientSessionPeer; | 141 friend class test::QuicClientSessionPeer; |
142 | 142 |
143 typedef std::list<StreamRequest*> StreamRequestQueue; | 143 typedef std::list<StreamRequest*> StreamRequestQueue; |
144 | 144 |
145 QuicReliableClientStream* CreateOutgoingReliableStreamImpl(); | 145 QuicReliableClientStream* CreateOutgoingReliableStreamImpl(); |
146 // A completion callback invoked when a read completes. | 146 // A completion callback invoked when a read completes. |
147 void OnReadComplete(int result); | 147 void OnReadComplete(int result); |
148 | 148 |
149 void OnClosedStream(); | 149 void OnClosedStream(); |
150 | 150 |
151 void CloseSessionOnErrorInner(int error); | 151 void CloseSessionOnErrorInner(int net_error, QuicErrorCode quic_error); |
152 | 152 |
153 // Posts a task to notify the factory that this session has been closed. | 153 // Posts a task to notify the factory that this session has been closed. |
154 void NotifyFactoryOfSessionCloseLater(); | 154 void NotifyFactoryOfSessionCloseLater(); |
155 | 155 |
156 // Notifies the factory that this session has been closed which will | 156 // Notifies the factory that this session has been closed which will |
157 // delete |this|. | 157 // delete |this|. |
158 void NotifyFactoryOfSessionClose(); | 158 void NotifyFactoryOfSessionClose(); |
159 | 159 |
160 bool require_confirmation_; | 160 bool require_confirmation_; |
161 scoped_ptr<QuicCryptoClientStream> crypto_stream_; | 161 scoped_ptr<QuicCryptoClientStream> crypto_stream_; |
162 QuicStreamFactory* stream_factory_; | 162 QuicStreamFactory* stream_factory_; |
163 scoped_ptr<DatagramClientSocket> socket_; | 163 scoped_ptr<DatagramClientSocket> socket_; |
164 scoped_refptr<IOBufferWithSize> read_buffer_; | 164 scoped_refptr<IOBufferWithSize> read_buffer_; |
165 StreamRequestQueue stream_requests_; | 165 StreamRequestQueue stream_requests_; |
166 bool read_pending_; | 166 bool read_pending_; |
167 CompletionCallback callback_; | 167 CompletionCallback callback_; |
168 size_t num_total_streams_; | 168 size_t num_total_streams_; |
169 BoundNetLog net_log_; | 169 BoundNetLog net_log_; |
170 QuicConnectionLogger logger_; | 170 QuicConnectionLogger logger_; |
171 base::WeakPtrFactory<QuicClientSession> weak_factory_; | 171 base::WeakPtrFactory<QuicClientSession> weak_factory_; |
172 | 172 |
173 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 173 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
174 }; | 174 }; |
175 | 175 |
176 } // namespace net | 176 } // namespace net |
177 | 177 |
178 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ | 178 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ |
OLD | NEW |