| 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 | |
| 168 protected: | 164 protected: |
| 169 // Called by OnStreamHeadersComplete depending on which type (initial or | 165 // Called by OnStreamHeadersComplete depending on which type (initial or |
| 170 // trailing) headers are expected next. | 166 // trailing) headers are expected next. |
| 171 virtual void OnInitialHeadersComplete(bool fin, size_t frame_len); | 167 virtual void OnInitialHeadersComplete(bool fin, size_t frame_len); |
| 172 virtual void OnTrailingHeadersComplete(bool fin, size_t frame_len); | 168 virtual void OnTrailingHeadersComplete(bool fin, size_t frame_len); |
| 173 QuicSpdySession* spdy_session() const { return spdy_session_; } | 169 QuicSpdySession* spdy_session() const { return spdy_session_; } |
| 174 Visitor* visitor() { return visitor_; } | 170 Visitor* visitor() { return visitor_; } |
| 175 | 171 |
| 176 // Returns true if headers have been fully read and consumed. | 172 // Returns true if headers have been fully read and consumed. |
| 177 bool FinishedReadingHeaders() const; | 173 bool FinishedReadingHeaders() const; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 202 std::string decompressed_trailers_; | 198 std::string decompressed_trailers_; |
| 203 // The parsed trailers received from the peer. | 199 // The parsed trailers received from the peer. |
| 204 SpdyHeaderBlock received_trailers_; | 200 SpdyHeaderBlock received_trailers_; |
| 205 | 201 |
| 206 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); | 202 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); |
| 207 }; | 203 }; |
| 208 | 204 |
| 209 } // namespace net | 205 } // namespace net |
| 210 | 206 |
| 211 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ | 207 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ |
| OLD | NEW |