| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "net/base/net_api.h" | 10 #include "net/base/net_export.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 // A container class that represents a "range" specified for range request | 14 // A container class that represents a "range" specified for range request |
| 15 // specified by RFC 2616 Section 14.35.1. | 15 // specified by RFC 2616 Section 14.35.1. |
| 16 // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1 | 16 // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1 |
| 17 class NET_API HttpByteRange { | 17 class NET_EXPORT HttpByteRange { |
| 18 public: | 18 public: |
| 19 HttpByteRange(); | 19 HttpByteRange(); |
| 20 | 20 |
| 21 // Since this class is POD, we use constructor, assignment operator | 21 // Since this class is POD, we use constructor, assignment operator |
| 22 // and destructor provided by compiler. | 22 // and destructor provided by compiler. |
| 23 int64 first_byte_position() const { return first_byte_position_; } | 23 int64 first_byte_position() const { return first_byte_position_; } |
| 24 void set_first_byte_position(int64 value) { first_byte_position_ = value; } | 24 void set_first_byte_position(int64 value) { first_byte_position_ = value; } |
| 25 | 25 |
| 26 int64 last_byte_position() const { return last_byte_position_; } | 26 int64 last_byte_position() const { return last_byte_position_; } |
| 27 void set_last_byte_position(int64 value) { last_byte_position_ = value; } | 27 void set_last_byte_position(int64 value) { last_byte_position_ = value; } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 51 private: | 51 private: |
| 52 int64 first_byte_position_; | 52 int64 first_byte_position_; |
| 53 int64 last_byte_position_; | 53 int64 last_byte_position_; |
| 54 int64 suffix_length_; | 54 int64 suffix_length_; |
| 55 bool has_computed_bounds_; | 55 bool has_computed_bounds_; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace net | 58 } // namespace net |
| 59 | 59 |
| 60 #endif // NET_HTTP_HTTP_BYTE_RANGE_H_ | 60 #endif // NET_HTTP_HTTP_BYTE_RANGE_H_ |
| OLD | NEW |