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_BYTES_ELEMENT_READER_H_ | 5 #ifndef NET_BASE_UPLOAD_BYTES_ELEMENT_READER_H_ |
6 #define NET_BASE_UPLOAD_BYTES_ELEMENT_READER_H_ | 6 #define NET_BASE_UPLOAD_BYTES_ELEMENT_READER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/basictypes.h" | |
12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" |
13 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
14 #include "net/base/upload_element_reader.h" | 16 #include "net/base/upload_element_reader.h" |
15 | 17 |
16 namespace net { | 18 namespace net { |
17 | 19 |
18 // An UploadElementReader implementation for bytes. The caller owns |bytes|, | 20 // An UploadElementReader implementation for bytes. The caller owns |bytes|, |
19 // and is responsible for ensuring it outlives the UploadBytesElementReader. | 21 // and is responsible for ensuring it outlives the UploadBytesElementReader. |
20 class NET_EXPORT UploadBytesElementReader : public UploadElementReader { | 22 class NET_EXPORT UploadBytesElementReader : public UploadElementReader { |
21 public: | 23 public: |
22 UploadBytesElementReader(const char* bytes, uint64_t length); | 24 UploadBytesElementReader(const char* bytes, uint64_t length); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 59 |
58 private: | 60 private: |
59 std::vector<char> data_; | 61 std::vector<char> data_; |
60 | 62 |
61 DISALLOW_COPY_AND_ASSIGN(UploadOwnedBytesElementReader); | 63 DISALLOW_COPY_AND_ASSIGN(UploadOwnedBytesElementReader); |
62 }; | 64 }; |
63 | 65 |
64 } // namespace net | 66 } // namespace net |
65 | 67 |
66 #endif // NET_BASE_UPLOAD_BYTES_ELEMENT_READER_H_ | 68 #endif // NET_BASE_UPLOAD_BYTES_ELEMENT_READER_H_ |
OLD | NEW |