| 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 21 matching lines...) Expand all Loading... |
| 32 protected: | 32 protected: |
| 33 virtual ~ChunkCallback() {} | 33 virtual ~ChunkCallback() {} |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 //----------------------------------------------------------------------------- | 36 //----------------------------------------------------------------------------- |
| 37 // A very concrete class representing the data to be uploaded as part of a | 37 // A very concrete class representing the data to be uploaded as part of a |
| 38 // URLRequest. | 38 // URLRequest. |
| 39 // | 39 // |
| 40 // Until there is a more abstract class for this, this one derives from | 40 // Until there is a more abstract class for this, this one derives from |
| 41 // SupportsUserData to allow users to stash random data by | 41 // SupportsUserData to allow users to stash random data by |
| 42 // key and ensure it's destruction when UploadData is finally deleted. | 42 // key and ensure its destruction when UploadData is finally deleted. |
| 43 class NET_EXPORT UploadData | 43 class NET_EXPORT UploadData |
| 44 : public base::RefCounted<UploadData>, | 44 : public base::RefCounted<UploadData>, |
| 45 public base::SupportsUserData { | 45 public base::SupportsUserData { |
| 46 public: | 46 public: |
| 47 enum Type { | 47 enum Type { |
| 48 TYPE_BYTES, | 48 TYPE_BYTES, |
| 49 TYPE_FILE, | 49 TYPE_FILE, |
| 50 TYPE_BLOB, | 50 TYPE_BLOB, |
| 51 | 51 |
| 52 // A block of bytes to be sent in chunked encoding immediately, without | 52 // A block of bytes to be sent in chunked encoding immediately, without |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 | 278 |
| 279 inline bool operator!=(const UploadData::Element& a, | 279 inline bool operator!=(const UploadData::Element& a, |
| 280 const UploadData::Element& b) { | 280 const UploadData::Element& b) { |
| 281 return !(a == b); | 281 return !(a == b); |
| 282 } | 282 } |
| 283 #endif // defined(UNIT_TEST) | 283 #endif // defined(UNIT_TEST) |
| 284 | 284 |
| 285 } // namespace net | 285 } // namespace net |
| 286 | 286 |
| 287 #endif // NET_BASE_UPLOAD_DATA_H_ | 287 #endif // NET_BASE_UPLOAD_DATA_H_ |
| OLD | NEW |