OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_STREAM_H_ | 5 #ifndef NET_BASE_UPLOAD_DATA_STREAM_H_ |
6 #define NET_BASE_UPLOAD_DATA_STREAM_H_ | 6 #define NET_BASE_UPLOAD_DATA_STREAM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "net/base/file_stream.h" | 9 #include "base/scoped_ptr.h" |
10 #include "net/base/upload_data.h" | 10 #include "net/base/upload_data.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
| 14 class FileStream; |
14 class IOBuffer; | 15 class IOBuffer; |
15 | 16 |
16 class UploadDataStream { | 17 class UploadDataStream { |
17 public: | 18 public: |
18 // Returns a new instance of UploadDataStream if it can be created and | 19 // Returns a new instance of UploadDataStream if it can be created and |
19 // initialized successfully. If not, NULL will be returned and the error | 20 // initialized successfully. If not, NULL will be returned and the error |
20 // code will be set if the output parameter error_code is not empty. | 21 // code will be set if the output parameter error_code is not empty. |
21 static UploadDataStream* Create(UploadData* data, int* error_code); | 22 static UploadDataStream* Create(UploadData* data, int* error_code); |
22 | 23 |
23 ~UploadDataStream(); | 24 ~UploadDataStream(); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 84 |
84 // Whether there is no data left to read. | 85 // Whether there is no data left to read. |
85 bool eof_; | 86 bool eof_; |
86 | 87 |
87 DISALLOW_COPY_AND_ASSIGN(UploadDataStream); | 88 DISALLOW_COPY_AND_ASSIGN(UploadDataStream); |
88 }; | 89 }; |
89 | 90 |
90 } // namespace net | 91 } // namespace net |
91 | 92 |
92 #endif // NET_BASE_UPLOAD_DATA_STREAM_H_ | 93 #endif // NET_BASE_UPLOAD_DATA_STREAM_H_ |
OLD | NEW |