| 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 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // QuicChromiumClientStream::Delegate implementation | 72 // QuicChromiumClientStream::Delegate implementation |
| 73 void OnHeadersAvailable(const SpdyHeaderBlock& headers, | 73 void OnHeadersAvailable(const SpdyHeaderBlock& headers, |
| 74 size_t frame_len) override; | 74 size_t frame_len) override; |
| 75 void OnDataAvailable() override; | 75 void OnDataAvailable() override; |
| 76 void OnClose(QuicErrorCode error) override; | 76 void OnClose(QuicErrorCode error) override; |
| 77 void OnError(int error) override; | 77 void OnError(int error) override; |
| 78 bool HasSendHeadersComplete() override; | 78 bool HasSendHeadersComplete() override; |
| 79 | 79 |
| 80 // QuicChromiumClientSession::Observer implementation | 80 // QuicChromiumClientSession::Observer implementation |
| 81 void OnCryptoHandshakeConfirmed() override; | 81 void OnCryptoHandshakeConfirmed() override; |
| 82 void OnSessionClosed(int error) override; | 82 void OnSessionClosed(int error, bool port_migration_detected) override; |
| 83 | 83 |
| 84 // QuicClientPushPromiseIndex::Delegate implementation | 84 // QuicClientPushPromiseIndex::Delegate implementation |
| 85 bool CheckVary(const SpdyHeaderBlock& client_request, | 85 bool CheckVary(const SpdyHeaderBlock& client_request, |
| 86 const SpdyHeaderBlock& promise_request, | 86 const SpdyHeaderBlock& promise_request, |
| 87 const SpdyHeaderBlock& promise_response) override; | 87 const SpdyHeaderBlock& promise_response) override; |
| 88 void OnRendezvousResult(QuicSpdyStream* stream) override; | 88 void OnRendezvousResult(QuicSpdyStream* stream) override; |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 friend class test::QuicHttpStreamPeer; | 91 friend class test::QuicHttpStreamPeer; |
| 92 | 92 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // Wraps raw_request_body_buf_ to read the remaining data progressively. | 186 // Wraps raw_request_body_buf_ to read the remaining data progressively. |
| 187 scoped_refptr<DrainableIOBuffer> request_body_buf_; | 187 scoped_refptr<DrainableIOBuffer> request_body_buf_; |
| 188 | 188 |
| 189 BoundNetLog stream_net_log_; | 189 BoundNetLog stream_net_log_; |
| 190 | 190 |
| 191 QuicErrorCode quic_connection_error_; | 191 QuicErrorCode quic_connection_error_; |
| 192 | 192 |
| 193 // SSLInfo from the underlying QuicSession. | 193 // SSLInfo from the underlying QuicSession. |
| 194 SSLInfo ssl_info_; | 194 SSLInfo ssl_info_; |
| 195 | 195 |
| 196 // True when this stream receives a go away from server due to port migration. |
| 197 bool port_migration_detected_; |
| 198 |
| 196 bool found_promise_; | 199 bool found_promise_; |
| 197 // |QuicClientPromisedInfo| owns this. It will be set when |Try()| | 200 // |QuicClientPromisedInfo| owns this. It will be set when |Try()| |
| 198 // is asynchronous, i.e. it returned QUIC_PENDING, and remains valid | 201 // is asynchronous, i.e. it returned QUIC_PENDING, and remains valid |
| 199 // until |OnRendezvouResult()| fires or |push_handle_->Cancel()| is | 202 // until |OnRendezvouResult()| fires or |push_handle_->Cancel()| is |
| 200 // invoked. | 203 // invoked. |
| 201 QuicClientPushPromiseIndex::TryHandle* push_handle_; | 204 QuicClientPushPromiseIndex::TryHandle* push_handle_; |
| 202 | 205 |
| 203 base::WeakPtrFactory<QuicHttpStream> weak_factory_; | 206 base::WeakPtrFactory<QuicHttpStream> weak_factory_; |
| 204 | 207 |
| 205 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); | 208 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); |
| 206 }; | 209 }; |
| 207 | 210 |
| 208 } // namespace net | 211 } // namespace net |
| 209 | 212 |
| 210 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ | 213 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ |
| OLD | NEW |