Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Side by Side Diff: net/quic/quic_spdy_stream.h

Issue 1970073002: Revert of Fixes use-after-free bug in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_spdy_session.cc ('k') | net/quic/quic_spdy_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « net/quic/quic_spdy_session.cc ('k') | net/quic/quic_spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698