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

Side by Side Diff: net/http/http_response_headers.h

Issue 8591037: Implement Drain() on HttpPipelinedStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Skip on unusable Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_response_body_drainer_unittest.cc ('k') | net/http/http_response_headers.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef NET_HTTP_HTTP_RESPONSE_HEADERS_H_ 5 #ifndef NET_HTTP_HTTP_RESPONSE_HEADERS_H_
6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ 6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // valid for a 206 response; otherwise returns false. 232 // valid for a 206 response; otherwise returns false.
233 // The following values will be outputted: 233 // The following values will be outputted:
234 // |*first_byte_position| = inclusive position of the first byte of the range 234 // |*first_byte_position| = inclusive position of the first byte of the range
235 // |*last_byte_position| = inclusive position of the last byte of the range 235 // |*last_byte_position| = inclusive position of the last byte of the range
236 // |*instance_length| = size in bytes of the object requested 236 // |*instance_length| = size in bytes of the object requested
237 // If any of the above values is unknown, its value will be -1. 237 // If any of the above values is unknown, its value will be -1.
238 bool GetContentRange(int64* first_byte_position, 238 bool GetContentRange(int64* first_byte_position,
239 int64* last_byte_position, 239 int64* last_byte_position,
240 int64* instance_length) const; 240 int64* instance_length) const;
241 241
242 // Returns true if the response is chunk-encoded.
243 bool IsChunkEncoded() const;
244
242 // Returns the HTTP response code. This is 0 if the response code text seems 245 // Returns the HTTP response code. This is 0 if the response code text seems
243 // to exist but could not be parsed. Otherwise, it defaults to 200 if the 246 // to exist but could not be parsed. Otherwise, it defaults to 200 if the
244 // response code is not found in the raw headers. 247 // response code is not found in the raw headers.
245 int response_code() const { return response_code_; } 248 int response_code() const { return response_code_; }
246 249
247 // Returns the raw header string. 250 // Returns the raw header string.
248 const std::string& raw_headers() const { return raw_headers_; } 251 const std::string& raw_headers() const { return raw_headers_; }
249 252
250 private: 253 private:
251 friend class base::RefCountedThreadSafe<HttpResponseHeaders>; 254 friend class base::RefCountedThreadSafe<HttpResponseHeaders>;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 355
353 // The parsed http version number (not normalized). 356 // The parsed http version number (not normalized).
354 HttpVersion parsed_http_version_; 357 HttpVersion parsed_http_version_;
355 358
356 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); 359 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders);
357 }; 360 };
358 361
359 } // namespace net 362 } // namespace net
360 363
361 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ 364 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_
OLDNEW
« no previous file with comments | « net/http/http_response_body_drainer_unittest.cc ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698