| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SPDY_MULTIPLEXED_HTTP_STREAM_H_ | 5 #ifndef NET_SPDY_MULTIPLEXED_HTTP_STREAM_H_ |
| 6 #define NET_SPDY_MULTIPLEXED_HTTP_STREAM_H_ | 6 #define NET_SPDY_MULTIPLEXED_HTTP_STREAM_H_ |
| 7 | 7 |
| 8 #include "net/http/http_stream.h" | 8 #include "net/http/http_stream.h" |
| 9 #include "net/spdy/chromium/multiplexed_session.h" | 9 #include "net/spdy/chromium/multiplexed_session.h" |
| 10 | 10 |
| 11 namespace net { | 11 namespace net { |
| 12 | 12 |
| 13 // Base class for SPDY and QUIC HttpStream subclasses. | 13 // Base class for SPDY and QUIC HttpStream subclasses. |
| 14 class NET_EXPORT_PRIVATE MultiplexedHttpStream : public HttpStream { | 14 class NET_EXPORT_PRIVATE MultiplexedHttpStream : public HttpStream { |
| 15 public: | 15 public: |
| 16 explicit MultiplexedHttpStream(MultiplexedSessionHandle session); | 16 explicit MultiplexedHttpStream( |
| 17 std::unique_ptr<MultiplexedSessionHandle> session); |
| 17 ~MultiplexedHttpStream() override; | 18 ~MultiplexedHttpStream() override; |
| 18 | 19 |
| 19 bool GetRemoteEndpoint(IPEndPoint* endpoint) override; | 20 bool GetRemoteEndpoint(IPEndPoint* endpoint) override; |
| 20 void GetSSLInfo(SSLInfo* ssl_info) override; | 21 void GetSSLInfo(SSLInfo* ssl_info) override; |
| 21 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; | 22 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; |
| 22 Error GetTokenBindingSignature(crypto::ECPrivateKey* key, | 23 Error GetTokenBindingSignature(crypto::ECPrivateKey* key, |
| 23 TokenBindingType tb_type, | 24 TokenBindingType tb_type, |
| 24 std::vector<uint8_t>* out) override; | 25 std::vector<uint8_t>* out) override; |
| 25 void Drain(HttpNetworkSession* session) override; | 26 void Drain(HttpNetworkSession* session) override; |
| 26 HttpStream* RenewStreamForAuth() override; | 27 HttpStream* RenewStreamForAuth() override; |
| 27 void SetConnectionReused() override; | 28 void SetConnectionReused() override; |
| 28 bool CanReuseConnection() const override; | 29 bool CanReuseConnection() const override; |
| 29 | 30 |
| 30 // Caches SSL info from the underlying session. | 31 // Caches SSL info from the underlying session. |
| 31 void SaveSSLInfo(); | 32 void SaveSSLInfo(); |
| 32 | 33 |
| 34 protected: |
| 35 MultiplexedSessionHandle* session() { return session_.get(); } |
| 36 const MultiplexedSessionHandle* session() const { return session_.get(); } |
| 37 |
| 33 private: | 38 private: |
| 34 MultiplexedSessionHandle session_; | 39 const std::unique_ptr<MultiplexedSessionHandle> session_; |
| 35 }; | 40 }; |
| 36 | 41 |
| 37 } // namespace net | 42 } // namespace net |
| 38 | 43 |
| 39 #endif // NET_SPDY_MULTIPLEXED_HTTP_STREAM_H_ | 44 #endif // NET_SPDY_MULTIPLEXED_HTTP_STREAM_H_ |
| OLD | NEW |