| 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_PARTIAL_DATA_H_ | 5 #ifndef NET_HTTP_PARTIAL_DATA_H_ |
| 6 #define NET_HTTP_PARTIAL_DATA_H_ | 6 #define NET_HTTP_PARTIAL_DATA_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "net/base/completion_callback.h" | 9 #include "net/base/completion_callback.h" |
| 10 #include "net/http/http_byte_range.h" | 10 #include "net/http/http_byte_range.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 class Core; | 118 class Core; |
| 119 // Returns the length to use when scanning the cache. | 119 // Returns the length to use when scanning the cache. |
| 120 int GetNextRangeLen(); | 120 int GetNextRangeLen(); |
| 121 | 121 |
| 122 // Completion routine for our callback. | 122 // Completion routine for our callback. |
| 123 void GetAvailableRangeCompleted(int result, int64 start); | 123 void GetAvailableRangeCompleted(int result, int64 start); |
| 124 | 124 |
| 125 int64 current_range_start_; | 125 int64 current_range_start_; |
| 126 int64 current_range_end_; |
| 126 int64 cached_start_; | 127 int64 cached_start_; |
| 127 int64 resource_size_; | 128 int64 resource_size_; |
| 128 int cached_min_len_; | 129 int cached_min_len_; |
| 129 HttpByteRange byte_range_; // The range requested by the user. | 130 HttpByteRange byte_range_; // The range requested by the user. |
| 130 // The clean set of extra headers (no ranges). | 131 // The clean set of extra headers (no ranges). |
| 131 HttpRequestHeaders extra_headers_; | 132 HttpRequestHeaders extra_headers_; |
| 132 bool range_present_; // True if next range entry is already stored. | 133 bool range_present_; // True if next range entry is already stored. |
| 133 bool final_range_; | 134 bool final_range_; |
| 134 bool sparse_entry_; | 135 bool sparse_entry_; |
| 135 bool truncated_; // We have an incomplete 200 stored. | 136 bool truncated_; // We have an incomplete 200 stored. |
| 136 bool initial_validation_; // Only used for truncated entries. | 137 bool initial_validation_; // Only used for truncated entries. |
| 137 Core* core_; | 138 Core* core_; |
| 138 CompletionCallback callback_; | 139 CompletionCallback callback_; |
| 139 | 140 |
| 140 DISALLOW_COPY_AND_ASSIGN(PartialData); | 141 DISALLOW_COPY_AND_ASSIGN(PartialData); |
| 141 }; | 142 }; |
| 142 | 143 |
| 143 } // namespace net | 144 } // namespace net |
| 144 | 145 |
| 145 #endif // NET_HTTP_PARTIAL_DATA_H_ | 146 #endif // NET_HTTP_PARTIAL_DATA_H_ |
| OLD | NEW |