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

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

Issue 2100213002: Make QuicSpdyStream::ParseHeaderStatusCode() inparam const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 // This block of functions wraps the sequencer's functions of the same 149 // This block of functions wraps the sequencer's functions of the same
150 // name. These methods return uncompressed data until that has 150 // name. These methods return uncompressed data until that has
151 // been fully processed. Then they simply delegate to the sequencer. 151 // been fully processed. Then they simply delegate to the sequencer.
152 virtual size_t Readv(const struct iovec* iov, size_t iov_len); 152 virtual size_t Readv(const struct iovec* iov, size_t iov_len);
153 virtual int GetReadableRegions(iovec* iov, size_t iov_len) const; 153 virtual int GetReadableRegions(iovec* iov, size_t iov_len) const;
154 void MarkConsumed(size_t num_bytes); 154 void MarkConsumed(size_t num_bytes);
155 155
156 // Returns true if header contains a valid 3-digit status and parse the status 156 // Returns true if header contains a valid 3-digit status and parse the status
157 // code to |status_code|. 157 // code to |status_code|.
158 bool ParseHeaderStatusCode(SpdyHeaderBlock* header, int* status_code) const; 158 bool ParseHeaderStatusCode(const SpdyHeaderBlock& header,
159 int* status_code) const;
159 160
160 // Returns true when all data has been read from the peer, including the fin. 161 // Returns true when all data has been read from the peer, including the fin.
161 bool IsDoneReading() const; 162 bool IsDoneReading() const;
162 bool HasBytesToRead() const; 163 bool HasBytesToRead() const;
163 164
164 void set_visitor(Visitor* visitor) { visitor_ = visitor; } 165 void set_visitor(Visitor* visitor) { visitor_ = visitor; }
165 166
166 bool headers_decompressed() const { return headers_decompressed_; } 167 bool headers_decompressed() const { return headers_decompressed_; }
167 168
168 const std::string& decompressed_headers() const { 169 const std::string& decompressed_headers() const {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 std::string decompressed_trailers_; 241 std::string decompressed_trailers_;
241 // The parsed trailers received from the peer. 242 // The parsed trailers received from the peer.
242 SpdyHeaderBlock received_trailers_; 243 SpdyHeaderBlock received_trailers_;
243 244
244 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); 245 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream);
245 }; 246 };
246 247
247 } // namespace net 248 } // namespace net
248 249
249 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ 250 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698