| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 class CertVerifyResult; | 41 class CertVerifyResult; |
| 42 class DatagramClientSocket; | 42 class DatagramClientSocket; |
| 43 class QuicCryptoClientStreamFactory; | 43 class QuicCryptoClientStreamFactory; |
| 44 class QuicServerInfo; | 44 class QuicServerInfo; |
| 45 class QuicStreamFactory; | 45 class QuicStreamFactory; |
| 46 class SSLInfo; | 46 class SSLInfo; |
| 47 class TransportSecurityState; | 47 class TransportSecurityState; |
| 48 | 48 |
| 49 using TokenBindingSignatureMap = | 49 using TokenBindingSignatureMap = |
| 50 base::MRUCache<std::string, std::vector<uint8_t>>; | 50 base::MRUCache<std::pair<TokenBindingType, std::string>, |
| 51 std::vector<uint8_t>>; |
| 51 | 52 |
| 52 namespace test { | 53 namespace test { |
| 53 class QuicChromiumClientSessionPeer; | 54 class QuicChromiumClientSessionPeer; |
| 54 } // namespace test | 55 } // namespace test |
| 55 | 56 |
| 56 class NET_EXPORT_PRIVATE QuicChromiumClientSession | 57 class NET_EXPORT_PRIVATE QuicChromiumClientSession |
| 57 : public QuicClientSessionBase, | 58 : public QuicClientSessionBase, |
| 58 public QuicChromiumPacketReader::Visitor, | 59 public QuicChromiumPacketReader::Visitor, |
| 59 public QuicChromiumPacketWriter::Delegate { | 60 public QuicChromiumPacketWriter::Delegate { |
| 60 public: | 61 public: |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 189 |
| 189 // QuicChromiumPacketReader::Visitor methods: | 190 // QuicChromiumPacketReader::Visitor methods: |
| 190 void OnReadError(int result, const DatagramClientSocket* socket) override; | 191 void OnReadError(int result, const DatagramClientSocket* socket) override; |
| 191 bool OnPacket(const QuicReceivedPacket& packet, | 192 bool OnPacket(const QuicReceivedPacket& packet, |
| 192 IPEndPoint local_address, | 193 IPEndPoint local_address, |
| 193 IPEndPoint peer_address) override; | 194 IPEndPoint peer_address) override; |
| 194 | 195 |
| 195 // Gets the SSL connection information. | 196 // Gets the SSL connection information. |
| 196 bool GetSSLInfo(SSLInfo* ssl_info) const; | 197 bool GetSSLInfo(SSLInfo* ssl_info) const; |
| 197 | 198 |
| 198 // Signs the exported keying material used for Token Binding using key |*key| | 199 // Generates the signature used in Token Binding using key |*key| and for a |
| 199 // and puts the signature in |*out|. Returns a net error code. | 200 // Token Binding of type |tb_type|, putting the signature in |*out|. Returns a |
| 201 // net error code. |
| 200 Error GetTokenBindingSignature(crypto::ECPrivateKey* key, | 202 Error GetTokenBindingSignature(crypto::ECPrivateKey* key, |
| 203 TokenBindingType tb_type, |
| 201 std::vector<uint8_t>* out); | 204 std::vector<uint8_t>* out); |
| 202 | 205 |
| 203 // Performs a crypto handshake with the server. | 206 // Performs a crypto handshake with the server. |
| 204 int CryptoConnect(bool require_confirmation, | 207 int CryptoConnect(bool require_confirmation, |
| 205 const CompletionCallback& callback); | 208 const CompletionCallback& callback); |
| 206 | 209 |
| 207 // Resumes a crypto handshake with the server after a timeout. | 210 // Resumes a crypto handshake with the server after a timeout. |
| 208 int ResumeCryptoConnect(const CompletionCallback& callback); | 211 int ResumeCryptoConnect(const CompletionCallback& callback); |
| 209 | 212 |
| 210 // Causes the QuicConnectionHelper to start reading from all sockets | 213 // Causes the QuicConnectionHelper to start reading from all sockets |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 // the current sockets_.size() == the passed in value. | 381 // the current sockets_.size() == the passed in value. |
| 379 bool migration_pending_; // True while migration is underway. | 382 bool migration_pending_; // True while migration is underway. |
| 380 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; | 383 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; |
| 381 | 384 |
| 382 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); | 385 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); |
| 383 }; | 386 }; |
| 384 | 387 |
| 385 } // namespace net | 388 } // namespace net |
| 386 | 389 |
| 387 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ | 390 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ |
| OLD | NEW |