Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1066)

Side by Side Diff: net/base/upload_data_stream.h

Issue 8843: Add write and read/write support to FileStream (renamed from FileInputStream)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/file_stream_win.cc ('k') | net/base/upload_data_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 7
8 #include "net/base/file_input_stream.h" 8 #include "net/base/file_stream.h"
9 #include "net/base/upload_data.h" 9 #include "net/base/upload_data.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 class UploadDataStream { 13 class UploadDataStream {
14 public: 14 public:
15 UploadDataStream(const UploadData* data); 15 UploadDataStream(const UploadData* data);
16 ~UploadDataStream(); 16 ~UploadDataStream();
17 17
18 // Returns the stream's buffer and buffer length. 18 // Returns the stream's buffer and buffer length.
(...skipping 27 matching lines...) Expand all
46 46
47 // Iterator to the upload element to be written to the send buffer next. 47 // Iterator to the upload element to be written to the send buffer next.
48 std::vector<UploadData::Element>::const_iterator next_element_; 48 std::vector<UploadData::Element>::const_iterator next_element_;
49 49
50 // The byte offset into next_element_'s data buffer if the next element is 50 // The byte offset into next_element_'s data buffer if the next element is
51 // a TYPE_BYTES element. 51 // a TYPE_BYTES element.
52 size_t next_element_offset_; 52 size_t next_element_offset_;
53 53
54 // A stream to the currently open file, for next_element_ if the next element 54 // A stream to the currently open file, for next_element_ if the next element
55 // is a TYPE_FILE element. 55 // is a TYPE_FILE element.
56 FileInputStream next_element_stream_; 56 FileStream next_element_stream_;
57 57
58 // The number of bytes remaining to be read from the currently open file 58 // The number of bytes remaining to be read from the currently open file
59 // if the next element is of TYPE_FILE. 59 // if the next element is of TYPE_FILE.
60 uint64 next_element_remaining_; 60 uint64 next_element_remaining_;
61 61
62 // Size and current read position within the stream. 62 // Size and current read position within the stream.
63 uint64 total_size_; 63 uint64 total_size_;
64 uint64 current_position_; 64 uint64 current_position_;
65 65
66 DISALLOW_EVIL_CONSTRUCTORS(UploadDataStream); 66 DISALLOW_EVIL_CONSTRUCTORS(UploadDataStream);
67 }; 67 };
68 68
69 } // namespace net 69 } // namespace net
70 70
71 #endif // NET_BASE_UPLOAD_DATA_STREAM_H_ 71 #endif // NET_BASE_UPLOAD_DATA_STREAM_H_
72 72
OLDNEW
« no previous file with comments | « net/base/file_stream_win.cc ('k') | net/base/upload_data_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698