| 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_SPDY_SPDY_HTTP_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_HTTP_STREAM_H_ |
| 6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ | 6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // SpdyStream::Delegate implementation. | 89 // SpdyStream::Delegate implementation. |
| 90 void OnRequestHeadersSent() override; | 90 void OnRequestHeadersSent() override; |
| 91 SpdyResponseHeadersStatus OnResponseHeadersUpdated( | 91 SpdyResponseHeadersStatus OnResponseHeadersUpdated( |
| 92 const SpdyHeaderBlock& response_headers) override; | 92 const SpdyHeaderBlock& response_headers) override; |
| 93 void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override; | 93 void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override; |
| 94 void OnDataSent() override; | 94 void OnDataSent() override; |
| 95 void OnTrailers(const SpdyHeaderBlock& trailers) override; | 95 void OnTrailers(const SpdyHeaderBlock& trailers) override; |
| 96 void OnClose(int status) override; | 96 void OnClose(int status) override; |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 // Helper function used for resetting stream from inside the stream |
| 100 void ResetStreamInternal(); |
| 101 |
| 99 // Must be called only when |request_info_| is non-NULL. | 102 // Must be called only when |request_info_| is non-NULL. |
| 100 bool HasUploadData() const; | 103 bool HasUploadData() const; |
| 101 | 104 |
| 102 void OnStreamCreated(const CompletionCallback& callback, int rv); | 105 void OnStreamCreated(const CompletionCallback& callback, int rv); |
| 103 | 106 |
| 104 // Reads the remaining data (whether chunked or not) from the | 107 // Reads the remaining data (whether chunked or not) from the |
| 105 // request body stream and sends it if there's any. The read and | 108 // request body stream and sends it if there's any. The read and |
| 106 // subsequent sending may happen asynchronously. Must be called only | 109 // subsequent sending may happen asynchronously. Must be called only |
| 107 // when HasUploadData() is true. | 110 // when HasUploadData() is true. |
| 108 void ReadAndSendRequestBodyData(); | 111 void ReadAndSendRequestBodyData(); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 bool direct_; | 181 bool direct_; |
| 179 | 182 |
| 180 base::WeakPtrFactory<SpdyHttpStream> weak_factory_; | 183 base::WeakPtrFactory<SpdyHttpStream> weak_factory_; |
| 181 | 184 |
| 182 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); | 185 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); |
| 183 }; | 186 }; |
| 184 | 187 |
| 185 } // namespace net | 188 } // namespace net |
| 186 | 189 |
| 187 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ | 190 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ |
| OLD | NEW |