| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_UPLOAD_DATA_H_ | 5 #ifndef NET_BASE_UPLOAD_DATA_H_ |
| 6 #define NET_BASE_UPLOAD_DATA_H_ | 6 #define NET_BASE_UPLOAD_DATA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // The byte offset from the beginning of the element data. Used to track | 166 // The byte offset from the beginning of the element data. Used to track |
| 167 // the current position when reading data. | 167 // the current position when reading data. |
| 168 size_t offset_; | 168 size_t offset_; |
| 169 | 169 |
| 170 // The stream of the element data, if this element is of TYPE_FILE. | 170 // The stream of the element data, if this element is of TYPE_FILE. |
| 171 FileStream* file_stream_; | 171 FileStream* file_stream_; |
| 172 | 172 |
| 173 FRIEND_TEST_ALL_PREFIXES(UploadDataStreamTest, FileSmallerThanLength); | 173 FRIEND_TEST_ALL_PREFIXES(UploadDataStreamTest, FileSmallerThanLength); |
| 174 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, | 174 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, |
| 175 UploadFileSmallerThanLength); | 175 UploadFileSmallerThanLength); |
| 176 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionSpdy2Test, |
| 177 UploadFileSmallerThanLength); |
| 178 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionSpdy21Test, |
| 179 UploadFileSmallerThanLength); |
| 180 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionSpdy3Test, |
| 181 UploadFileSmallerThanLength); |
| 176 }; | 182 }; |
| 177 | 183 |
| 178 UploadData(); | 184 UploadData(); |
| 179 | 185 |
| 180 void AppendBytes(const char* bytes, int bytes_len); | 186 void AppendBytes(const char* bytes, int bytes_len); |
| 181 | 187 |
| 182 void AppendFileRange(const FilePath& file_path, | 188 void AppendFileRange(const FilePath& file_path, |
| 183 uint64 offset, uint64 length, | 189 uint64 offset, uint64 length, |
| 184 const base::Time& expected_modification_time); | 190 const base::Time& expected_modification_time); |
| 185 | 191 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 278 |
| 273 inline bool operator!=(const UploadData::Element& a, | 279 inline bool operator!=(const UploadData::Element& a, |
| 274 const UploadData::Element& b) { | 280 const UploadData::Element& b) { |
| 275 return !(a == b); | 281 return !(a == b); |
| 276 } | 282 } |
| 277 #endif // defined(UNIT_TEST) | 283 #endif // defined(UNIT_TEST) |
| 278 | 284 |
| 279 } // namespace net | 285 } // namespace net |
| 280 | 286 |
| 281 #endif // NET_BASE_UPLOAD_DATA_H_ | 287 #endif // NET_BASE_UPLOAD_DATA_H_ |
| OLD | NEW |