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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 // Close the session because of |error| and notifies the factory | 172 // Close the session because of |error| and notifies the factory |
173 // that this session has been closed, which will delete the session. | 173 // that this session has been closed, which will delete the session. |
174 void CloseSessionOnError(int error, QuicErrorCode quic_error); | 174 void CloseSessionOnError(int error, QuicErrorCode quic_error); |
175 | 175 |
176 // Close the session because of |error| and notifies the factory later that | 176 // Close the session because of |error| and notifies the factory later that |
177 // this session has been closed, which will delete the session. | 177 // this session has been closed, which will delete the session. |
178 void CloseSessionOnErrorAndNotifyFactoryLater(int error, | 178 void CloseSessionOnErrorAndNotifyFactoryLater(int error, |
179 QuicErrorCode quic_error); | 179 QuicErrorCode quic_error); |
180 | 180 |
181 base::Value* GetInfoAsValue(const std::set<HostPortPair>& aliases); | 181 scoped_ptr<base::Value> GetInfoAsValue(const std::set<HostPortPair>& aliases); |
182 | 182 |
183 const BoundNetLog& net_log() const { return net_log_; } | 183 const BoundNetLog& net_log() const { return net_log_; } |
184 | 184 |
185 base::WeakPtr<QuicClientSession> GetWeakPtr(); | 185 base::WeakPtr<QuicClientSession> GetWeakPtr(); |
186 | 186 |
187 // Returns the number of client hello messages that have been sent on the | 187 // Returns the number of client hello messages that have been sent on the |
188 // crypto stream. If the handshake has completed then this is one greater | 188 // crypto stream. If the handshake has completed then this is one greater |
189 // than the number of round-trips needed for the handshake. | 189 // than the number of round-trips needed for the handshake. |
190 int GetNumSentClientHellos() const; | 190 int GetNumSentClientHellos() const; |
191 | 191 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 // on this session. Existing stream will continue to be processed. | 264 // on this session. Existing stream will continue to be processed. |
265 bool going_away_; | 265 bool going_away_; |
266 base::WeakPtrFactory<QuicClientSession> weak_factory_; | 266 base::WeakPtrFactory<QuicClientSession> weak_factory_; |
267 | 267 |
268 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 268 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
269 }; | 269 }; |
270 | 270 |
271 } // namespace net | 271 } // namespace net |
272 | 272 |
273 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ | 273 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ |
OLD | NEW |