| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 #ifndef NET_QUIC_QUARTC_QUARTC_SESSION_H_ | 5 #ifndef NET_QUIC_QUARTC_QUARTC_SESSION_H_ |
| 6 #define NET_QUIC_QUARTC_QUARTC_SESSION_H_ | 6 #define NET_QUIC_QUARTC_QUARTC_SESSION_H_ |
| 7 | 7 |
| 8 #include "net/base/net_export.h" | 8 #include "net/base/net_export.h" |
| 9 #include "net/quic/core/quic_crypto_client_stream.h" | 9 #include "net/quic/core/quic_crypto_client_stream.h" |
| 10 #include "net/quic/core/quic_crypto_server_stream.h" | 10 #include "net/quic/core/quic_crypto_server_stream.h" |
| 11 #include "net/quic/core/quic_crypto_stream.h" | 11 #include "net/quic/core/quic_crypto_stream.h" |
| 12 #include "net/quic/core/quic_session.h" | 12 #include "net/quic/core/quic_session.h" |
| 13 #include "net/quic/platform/impl/quic_chromium_clock.h" |
| 13 #include "net/quic/quartc/quartc_session_interface.h" | 14 #include "net/quic/quartc/quartc_session_interface.h" |
| 14 #include "net/quic/quartc/quartc_stream.h" | 15 #include "net/quic/quartc/quartc_stream.h" |
| 15 | 16 |
| 16 namespace net { | 17 namespace net { |
| 17 | 18 |
| 18 // A helper class is used by the QuicCryptoServerStream. | 19 // A helper class is used by the QuicCryptoServerStream. |
| 19 class QuartcCryptoServerStreamHelper : public QuicCryptoServerStream::Helper { | 20 class QuartcCryptoServerStreamHelper : public QuicCryptoServerStream::Helper { |
| 20 public: | 21 public: |
| 21 QuicConnectionId GenerateConnectionIdForReject( | 22 QuicConnectionId GenerateConnectionIdForReject( |
| 22 QuicConnectionId connection_id) const override; | 23 QuicConnectionId connection_id) const override; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 protected: | 91 protected: |
| 91 // QuicSession override. | 92 // QuicSession override. |
| 92 QuicStream* CreateIncomingDynamicStream(QuicStreamId id) override; | 93 QuicStream* CreateIncomingDynamicStream(QuicStreamId id) override; |
| 93 | 94 |
| 94 QuartcStream* CreateDataStream(QuicStreamId id, SpdyPriority priority); | 95 QuartcStream* CreateDataStream(QuicStreamId id, SpdyPriority priority); |
| 95 | 96 |
| 96 private: | 97 private: |
| 97 // For crypto handshake. | 98 // For crypto handshake. |
| 98 std::unique_ptr<QuicCryptoStream> crypto_stream_; | 99 std::unique_ptr<QuicCryptoStream> crypto_stream_; |
| 99 // For recording packet receipt time | 100 // For recording packet receipt time |
| 100 QuicClock clock_; | 101 QuicChromiumClock clock_; |
| 101 const std::string unique_remote_server_id_; | 102 const std::string unique_remote_server_id_; |
| 102 Perspective perspective_; | 103 Perspective perspective_; |
| 103 // Take the ownership of the QuicConnection. | 104 // Take the ownership of the QuicConnection. |
| 104 std::unique_ptr<QuicConnection> connection_; | 105 std::unique_ptr<QuicConnection> connection_; |
| 105 // Not owned by QuartcSession. From the QuartcFactory. | 106 // Not owned by QuartcSession. From the QuartcFactory. |
| 106 QuicConnectionHelperInterface* helper_; | 107 QuicConnectionHelperInterface* helper_; |
| 107 // Not owned by QuartcSession. | 108 // Not owned by QuartcSession. |
| 108 QuartcSessionInterface::Delegate* session_delegate_ = nullptr; | 109 QuartcSessionInterface::Delegate* session_delegate_ = nullptr; |
| 109 // Used by QUIC crypto server stream to track most recently compressed certs. | 110 // Used by QUIC crypto server stream to track most recently compressed certs. |
| 110 std::unique_ptr<QuicCompressedCertsCache> quic_compressed_certs_cache_; | 111 std::unique_ptr<QuicCompressedCertsCache> quic_compressed_certs_cache_; |
| 111 // This helper is needed when create QuicCryptoServerStream. | 112 // This helper is needed when create QuicCryptoServerStream. |
| 112 QuartcCryptoServerStreamHelper stream_helper_; | 113 QuartcCryptoServerStreamHelper stream_helper_; |
| 113 // Config for QUIC crypto client stream, used by the client. | 114 // Config for QUIC crypto client stream, used by the client. |
| 114 std::unique_ptr<QuicCryptoClientConfig> quic_crypto_client_config_; | 115 std::unique_ptr<QuicCryptoClientConfig> quic_crypto_client_config_; |
| 115 // Config for QUIC crypto server stream, used by the server. | 116 // Config for QUIC crypto server stream, used by the server. |
| 116 std::unique_ptr<QuicCryptoServerConfig> quic_crypto_server_config_; | 117 std::unique_ptr<QuicCryptoServerConfig> quic_crypto_server_config_; |
| 117 | 118 |
| 118 DISALLOW_COPY_AND_ASSIGN(QuartcSession); | 119 DISALLOW_COPY_AND_ASSIGN(QuartcSession); |
| 119 }; | 120 }; |
| 120 | 121 |
| 121 } // namespace net | 122 } // namespace net |
| 122 | 123 |
| 123 #endif // NET_QUIC_QUARTC_QUARTC_SESSION_H_ | 124 #endif // NET_QUIC_QUARTC_QUARTC_SESSION_H_ |
| OLD | NEW |