| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // The base class for streams which deliver data to/from an application. | 5 // The base class for streams which deliver data to/from an application. |
| 6 // In each direction, the data on such a stream first contains compressed | 6 // In each direction, the data on such a stream first contains compressed |
| 7 // headers then body data. | 7 // headers then body data. |
| 8 | 8 |
| 9 #ifndef NET_QUIC_QUIC_SPDY_STREAM_H_ | 9 #ifndef NET_QUIC_QUIC_SPDY_STREAM_H_ |
| 10 #define NET_QUIC_QUIC_SPDY_STREAM_H_ | 10 #define NET_QUIC_QUIC_SPDY_STREAM_H_ |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 const SpdyHeaderBlock& received_trailers() const { | 154 const SpdyHeaderBlock& received_trailers() const { |
| 155 return received_trailers_; | 155 return received_trailers_; |
| 156 } | 156 } |
| 157 | 157 |
| 158 virtual SpdyPriority priority() const; | 158 virtual SpdyPriority priority() const; |
| 159 | 159 |
| 160 // Sets priority_ to priority. This should only be called before bytes are | 160 // Sets priority_ to priority. This should only be called before bytes are |
| 161 // written to the server. | 161 // written to the server. |
| 162 void SetPriority(SpdyPriority priority); | 162 void SetPriority(SpdyPriority priority); |
| 163 | 163 |
| 164 // Called when owning session is getting deleted to avoid subsequent |
| 165 // use of the spdy_session_ member. |
| 166 void ClearSession(); |
| 167 |
| 164 protected: | 168 protected: |
| 165 // Called by OnStreamHeadersComplete depending on which type (initial or | 169 // Called by OnStreamHeadersComplete depending on which type (initial or |
| 166 // trailing) headers are expected next. | 170 // trailing) headers are expected next. |
| 167 virtual void OnInitialHeadersComplete(bool fin, size_t frame_len); | 171 virtual void OnInitialHeadersComplete(bool fin, size_t frame_len); |
| 168 virtual void OnTrailingHeadersComplete(bool fin, size_t frame_len); | 172 virtual void OnTrailingHeadersComplete(bool fin, size_t frame_len); |
| 169 QuicSpdySession* spdy_session() const { return spdy_session_; } | 173 QuicSpdySession* spdy_session() const { return spdy_session_; } |
| 170 Visitor* visitor() { return visitor_; } | 174 Visitor* visitor() { return visitor_; } |
| 171 | 175 |
| 172 // Returns true if headers have been fully read and consumed. | 176 // Returns true if headers have been fully read and consumed. |
| 173 bool FinishedReadingHeaders() const; | 177 bool FinishedReadingHeaders() const; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 198 std::string decompressed_trailers_; | 202 std::string decompressed_trailers_; |
| 199 // The parsed trailers received from the peer. | 203 // The parsed trailers received from the peer. |
| 200 SpdyHeaderBlock received_trailers_; | 204 SpdyHeaderBlock received_trailers_; |
| 201 | 205 |
| 202 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); | 206 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); |
| 203 }; | 207 }; |
| 204 | 208 |
| 205 } // namespace net | 209 } // namespace net |
| 206 | 210 |
| 207 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ | 211 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ |
| OLD | NEW |