Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(868)

Side by Side Diff: net/quic/quic_client_session.h

Issue 23532042: Report a more specific QUIC error when reading from the socket fails. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/quic/quic_client_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698