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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // Close the session because of |error| and notifies the factory | 125 // Close the session because of |error| and notifies the factory |
126 // that this session has been closed, which will delete the session. | 126 // that this session has been closed, which will delete the session. |
127 void CloseSessionOnError(int error); | 127 void CloseSessionOnError(int error); |
128 | 128 |
129 base::Value* GetInfoAsValue(const HostPortPair& pair) const; | 129 base::Value* GetInfoAsValue(const HostPortPair& pair) const; |
130 | 130 |
131 const BoundNetLog& net_log() const { return net_log_; } | 131 const BoundNetLog& net_log() const { return net_log_; } |
132 | 132 |
133 base::WeakPtr<QuicClientSession> GetWeakPtr(); | 133 base::WeakPtr<QuicClientSession> GetWeakPtr(); |
134 | 134 |
| 135 // Returns the number of client hello messages that have been sent on the |
| 136 // crypto stream. If the handshake has completed then this is one greater |
| 137 // than the number of round-trips needed for the handshake. |
| 138 int GetNumSentClientHellos() const; |
| 139 |
135 protected: | 140 protected: |
136 // QuicSession methods: | 141 // QuicSession methods: |
137 virtual ReliableQuicStream* CreateIncomingReliableStream( | 142 virtual ReliableQuicStream* CreateIncomingReliableStream( |
138 QuicStreamId id) OVERRIDE; | 143 QuicStreamId id) OVERRIDE; |
139 | 144 |
140 private: | 145 private: |
141 friend class test::QuicClientSessionPeer; | 146 friend class test::QuicClientSessionPeer; |
142 | 147 |
143 typedef std::list<StreamRequest*> StreamRequestQueue; | 148 typedef std::list<StreamRequest*> StreamRequestQueue; |
144 | 149 |
(...skipping 24 matching lines...) Expand all Loading... |
169 BoundNetLog net_log_; | 174 BoundNetLog net_log_; |
170 QuicConnectionLogger logger_; | 175 QuicConnectionLogger logger_; |
171 base::WeakPtrFactory<QuicClientSession> weak_factory_; | 176 base::WeakPtrFactory<QuicClientSession> weak_factory_; |
172 | 177 |
173 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 178 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
174 }; | 179 }; |
175 | 180 |
176 } // namespace net | 181 } // namespace net |
177 | 182 |
178 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ | 183 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ |
OLD | NEW |