Chromium Code Reviews| 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_CHROMIUM_CLIENT_SESSION_H_ | 10 #ifndef NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 | 227 |
| 228 const BoundNetLog& net_log() const { return net_log_; } | 228 const BoundNetLog& net_log() const { return net_log_; } |
| 229 | 229 |
| 230 base::WeakPtr<QuicChromiumClientSession> GetWeakPtr(); | 230 base::WeakPtr<QuicChromiumClientSession> GetWeakPtr(); |
| 231 | 231 |
| 232 // Returns the number of client hello messages that have been sent on the | 232 // Returns the number of client hello messages that have been sent on the |
| 233 // crypto stream. If the handshake has completed then this is one greater | 233 // crypto stream. If the handshake has completed then this is one greater |
| 234 // than the number of round-trips needed for the handshake. | 234 // than the number of round-trips needed for the handshake. |
| 235 int GetNumSentClientHellos() const; | 235 int GetNumSentClientHellos() const; |
| 236 | 236 |
| 237 // Returns the stream id of the push stream if it is not claimed yet. | |
| 238 // Else return 0. | |
|
Ryan Hamilton
2016/09/22 21:41:33
nit: // Returns the stream id of the push stream
Zhongyi Shi
2016/09/22 22:57:06
Done.
| |
| 239 QuicStreamId GetStreamIdForPush(const GURL& pushed_url); | |
| 240 | |
| 237 // Returns true if |hostname| may be pooled onto this session. If this | 241 // Returns true if |hostname| may be pooled onto this session. If this |
| 238 // is a secure QUIC session, then |hostname| must match the certificate | 242 // is a secure QUIC session, then |hostname| must match the certificate |
| 239 // presented during the handshake. | 243 // presented during the handshake. |
| 240 bool CanPool(const std::string& hostname, PrivacyMode privacy_mode) const; | 244 bool CanPool(const std::string& hostname, PrivacyMode privacy_mode) const; |
| 241 | 245 |
| 242 const QuicServerId& server_id() const { return server_id_; } | 246 const QuicServerId& server_id() const { return server_id_; } |
| 243 | 247 |
| 244 // Attempts to migrate session when a write error is encountered. | 248 // Attempts to migrate session when a write error is encountered. |
| 245 void MigrateSessionOnWriteError(); | 249 void MigrateSessionOnWriteError(); |
| 246 | 250 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 381 // the current sockets_.size() == the passed in value. | 385 // the current sockets_.size() == the passed in value. |
| 382 bool migration_pending_; // True while migration is underway. | 386 bool migration_pending_; // True while migration is underway. |
| 383 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; | 387 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; |
| 384 | 388 |
| 385 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); | 389 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); |
| 386 }; | 390 }; |
| 387 | 391 |
| 388 } // namespace net | 392 } // namespace net |
| 389 | 393 |
| 390 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ | 394 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ |
| OLD | NEW |