| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, | 176 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionSpdy2Test, |
| 177 UploadFileSmallerThanLength); | 177 UploadFileSmallerThanLength); |
| 178 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionSpdy21Test, | |
| 179 UploadFileSmallerThanLength); | |
| 180 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionSpdy3Test, | 178 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionSpdy3Test, |
| 181 UploadFileSmallerThanLength); | 179 UploadFileSmallerThanLength); |
| 182 }; | 180 }; |
| 183 | 181 |
| 184 UploadData(); | 182 UploadData(); |
| 185 | 183 |
| 186 void AppendBytes(const char* bytes, int bytes_len); | 184 void AppendBytes(const char* bytes, int bytes_len); |
| 187 | 185 |
| 188 void AppendFileRange(const FilePath& file_path, | 186 void AppendFileRange(const FilePath& file_path, |
| 189 uint64 offset, uint64 length, | 187 uint64 offset, uint64 length, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 | 276 |
| 279 inline bool operator!=(const UploadData::Element& a, | 277 inline bool operator!=(const UploadData::Element& a, |
| 280 const UploadData::Element& b) { | 278 const UploadData::Element& b) { |
| 281 return !(a == b); | 279 return !(a == b); |
| 282 } | 280 } |
| 283 #endif // defined(UNIT_TEST) | 281 #endif // defined(UNIT_TEST) |
| 284 | 282 |
| 285 } // namespace net | 283 } // namespace net |
| 286 | 284 |
| 287 #endif // NET_BASE_UPLOAD_DATA_H_ | 285 #endif // NET_BASE_UPLOAD_DATA_H_ |
| OLD | NEW |