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

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

Issue 2093553004: Reduce SpdyHeaderBlock copies with move semantics in shared code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove non-shared files (into a separate CL). Created 4 years, 6 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_chromium_client_stream.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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual void OnPromiseHeaderList(QuicStreamId promised_id, 113 virtual void OnPromiseHeaderList(QuicStreamId promised_id,
114 size_t frame_len, 114 size_t frame_len,
115 const QuicHeaderList& header_list); 115 const QuicHeaderList& header_list);
116 116
117 // Override the base class to not discard response when receiving 117 // Override the base class to not discard response when receiving
118 // QUIC_STREAM_NO_ERROR on QUIC_VERSION_29 and later versions. 118 // QUIC_STREAM_NO_ERROR on QUIC_VERSION_29 and later versions.
119 void OnStreamReset(const QuicRstStreamFrame& frame) override; 119 void OnStreamReset(const QuicRstStreamFrame& frame) override;
120 120
121 // Writes the headers contained in |header_block| to the dedicated 121 // Writes the headers contained in |header_block| to the dedicated
122 // headers stream. 122 // headers stream.
123 virtual size_t WriteHeaders(const SpdyHeaderBlock& header_block, 123 virtual size_t WriteHeaders(SpdyHeaderBlock header_block,
124 bool fin, 124 bool fin,
125 QuicAckListenerInterface* ack_notifier_delegate); 125 QuicAckListenerInterface* ack_notifier_delegate);
126 126
127 // Sends |data| to the peer, or buffers if it can't be sent immediately. 127 // Sends |data| to the peer, or buffers if it can't be sent immediately.
128 void WriteOrBufferBody(const std::string& data, 128 void WriteOrBufferBody(const std::string& data,
129 bool fin, 129 bool fin,
130 QuicAckListenerInterface* ack_notifier_delegate); 130 QuicAckListenerInterface* ack_notifier_delegate);
131 131
132 // Writes the trailers contained in |trailer_block| to the dedicated 132 // Writes the trailers contained in |trailer_block| to the dedicated
133 // headers stream. Trailers will always have the FIN set. 133 // headers stream. Trailers will always have the FIN set.
134 virtual size_t WriteTrailers(const SpdyHeaderBlock& trailer_block, 134 virtual size_t WriteTrailers(SpdyHeaderBlock trailer_block,
135 QuicAckListenerInterface* ack_notifier_delegate); 135 QuicAckListenerInterface* ack_notifier_delegate);
136 136
137 // Marks |bytes_consumed| of the headers data as consumed. 137 // Marks |bytes_consumed| of the headers data as consumed.
138 void MarkHeadersConsumed(size_t bytes_consumed); 138 void MarkHeadersConsumed(size_t bytes_consumed);
139 139
140 // Marks |bytes_consumed| of the trailers data as consumed. 140 // Marks |bytes_consumed| of the trailers data as consumed.
141 void MarkTrailersConsumed(size_t bytes_consumed); 141 void MarkTrailersConsumed(size_t bytes_consumed);
142 142
143 // Marks the trailers as consumed. 143 // Marks the trailers as consumed.
144 void MarkTrailersDelivered(); 144 void MarkTrailersDelivered();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 std::string decompressed_trailers_; 240 std::string decompressed_trailers_;
241 // The parsed trailers received from the peer. 241 // The parsed trailers received from the peer.
242 SpdyHeaderBlock received_trailers_; 242 SpdyHeaderBlock received_trailers_;
243 243
244 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); 244 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream);
245 }; 245 };
246 246
247 } // namespace net 247 } // namespace net
248 248
249 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ 249 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/quic_chromium_client_stream.cc ('k') | net/quic/quic_spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698