Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_BYTE_RANGE_H_ | 5 #ifndef NET_HTTP_HTTP_BYTE_RANGE_H_ |
| 6 #define NET_HTTP_HTTP_BYTE_RANGE_H_ | 6 #define NET_HTTP_HTTP_BYTE_RANGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 // A container class that represents a "range" specified for range request | 15 // A container class that represents a "range" specified for range request |
| 16 // specified by RFC 2616 Section 14.35.1. | 16 // specified by RFC 7233 Section 2.1. |
| 17 // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1 | 17 // http://tools.ietf.org/html/rfc7233#section-2.1 |
|
cbentzel
2014/06/10 19:55:42
Nit: use https rather than http (it works)
| |
| 18 class NET_EXPORT HttpByteRange { | 18 class NET_EXPORT HttpByteRange { |
| 19 public: | 19 public: |
| 20 HttpByteRange(); | 20 HttpByteRange(); |
| 21 | 21 |
| 22 // Convenience constructors. | 22 // Convenience constructors. |
| 23 static HttpByteRange Bounded(int64 first_byte_position, | 23 static HttpByteRange Bounded(int64 first_byte_position, |
| 24 int64 last_byte_position); | 24 int64 last_byte_position); |
| 25 static HttpByteRange RightUnbounded(int64 first_byte_position); | 25 static HttpByteRange RightUnbounded(int64 first_byte_position); |
| 26 static HttpByteRange Suffix(int64 suffix_length); | 26 static HttpByteRange Suffix(int64 suffix_length); |
| 27 | 27 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 private: | 62 private: |
| 63 int64 first_byte_position_; | 63 int64 first_byte_position_; |
| 64 int64 last_byte_position_; | 64 int64 last_byte_position_; |
| 65 int64 suffix_length_; | 65 int64 suffix_length_; |
| 66 bool has_computed_bounds_; | 66 bool has_computed_bounds_; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace net | 69 } // namespace net |
| 70 | 70 |
| 71 #endif // NET_HTTP_HTTP_BYTE_RANGE_H_ | 71 #endif // NET_HTTP_HTTP_BYTE_RANGE_H_ |
| OLD | NEW |