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 #ifndef NET_QUIC_QUIC_HTTP_STREAM_H_ | 5 #ifndef NET_QUIC_QUIC_HTTP_STREAM_H_ |
6 #define NET_QUIC_QUIC_HTTP_STREAM_H_ | 6 #define NET_QUIC_QUIC_HTTP_STREAM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <list> | 11 #include <list> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "net/base/io_buffer.h" | 15 #include "net/base/io_buffer.h" |
16 #include "net/http/http_stream.h" | 16 #include "net/http/http_stream.h" |
17 #include "net/quic/quic_chromium_client_session.h" | 17 #include "net/quic/quic_chromium_client_session.h" |
18 #include "net/quic/quic_chromium_client_stream.h" | 18 #include "net/quic/quic_chromium_client_stream.h" |
19 #include "net/quic/quic_client_push_promise_index.h" | 19 #include "net/quic/quic_client_push_promise_index.h" |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 | 22 |
23 namespace test { | 23 namespace test { |
24 class QuicHttpStreamPeer; | 24 class QuicHttpStreamPeer; |
25 } // namespace test | 25 } // namespace test |
26 | 26 |
| 27 class HttpResponseInfo; |
| 28 |
27 // The QuicHttpStream is a QUIC-specific HttpStream subclass. It holds a | 29 // The QuicHttpStream is a QUIC-specific HttpStream subclass. It holds a |
28 // non-owning pointer to a QuicChromiumClientStream which it uses to | 30 // non-owning pointer to a QuicChromiumClientStream which it uses to |
29 // send and receive data. | 31 // send and receive data. |
30 class NET_EXPORT_PRIVATE QuicHttpStream | 32 class NET_EXPORT_PRIVATE QuicHttpStream |
31 : public QuicChromiumClientSession::Observer, | 33 : public QuicChromiumClientSession::Observer, |
32 public QuicChromiumClientStream::Delegate, | 34 public QuicChromiumClientStream::Delegate, |
33 public QuicClientPushPromiseIndex::Delegate, | 35 public QuicClientPushPromiseIndex::Delegate, |
34 public HttpStream { | 36 public HttpStream { |
35 public: | 37 public: |
36 explicit QuicHttpStream( | 38 explicit QuicHttpStream( |
(...skipping 21 matching lines...) Expand all Loading... |
58 void SetConnectionReused() override; | 60 void SetConnectionReused() override; |
59 bool CanReuseConnection() const override; | 61 bool CanReuseConnection() const override; |
60 int64_t GetTotalReceivedBytes() const override; | 62 int64_t GetTotalReceivedBytes() const override; |
61 int64_t GetTotalSentBytes() const override; | 63 int64_t GetTotalSentBytes() const override; |
62 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; | 64 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |
63 void GetSSLInfo(SSLInfo* ssl_info) override; | 65 void GetSSLInfo(SSLInfo* ssl_info) override; |
64 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; | 66 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; |
65 bool GetRemoteEndpoint(IPEndPoint* endpoint) override; | 67 bool GetRemoteEndpoint(IPEndPoint* endpoint) override; |
66 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | 68 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
67 std::vector<uint8_t>* out) override; | 69 std::vector<uint8_t>* out) override; |
68 void Drain(HttpNetworkSession* session) override; | 70 void Drain(HttpNetworkSession* session, |
| 71 scoped_ptr<HttpResponseInfo> response_info) override; |
69 void PopulateNetErrorDetails(NetErrorDetails* details) override; | 72 void PopulateNetErrorDetails(NetErrorDetails* details) override; |
70 void SetPriority(RequestPriority priority) override; | 73 void SetPriority(RequestPriority priority) override; |
71 | 74 |
72 // QuicChromiumClientStream::Delegate implementation | 75 // QuicChromiumClientStream::Delegate implementation |
73 void OnHeadersAvailable(const SpdyHeaderBlock& headers, | 76 void OnHeadersAvailable(const SpdyHeaderBlock& headers, |
74 size_t frame_len) override; | 77 size_t frame_len) override; |
75 void OnDataAvailable() override; | 78 void OnDataAvailable() override; |
76 void OnClose(QuicErrorCode error) override; | 79 void OnClose(QuicErrorCode error) override; |
77 void OnError(int error) override; | 80 void OnError(int error) override; |
78 bool HasSendHeadersComplete() override; | 81 bool HasSendHeadersComplete() override; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 QuicClientPushPromiseIndex::TryHandle* push_handle_; | 207 QuicClientPushPromiseIndex::TryHandle* push_handle_; |
205 | 208 |
206 base::WeakPtrFactory<QuicHttpStream> weak_factory_; | 209 base::WeakPtrFactory<QuicHttpStream> weak_factory_; |
207 | 210 |
208 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); | 211 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); |
209 }; | 212 }; |
210 | 213 |
211 } // namespace net | 214 } // namespace net |
212 | 215 |
213 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ | 216 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ |
OLD | NEW |