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

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

Issue 10913179: net: Make UploadDataStream::Init() asynchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changed argument order Created 8 years, 3 months 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 | « chrome_frame/urlmon_upload_data_stream.cc ('k') | net/base/upload_bytes_element_reader.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) 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 "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "net/base/upload_element_reader.h" 9 #include "net/base/upload_element_reader.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 // An UploadElementReader implementation for bytes. 13 // An UploadElementReader implementation for bytes.
14 class NET_EXPORT_PRIVATE UploadBytesElementReader : public UploadElementReader { 14 class NET_EXPORT_PRIVATE UploadBytesElementReader : public UploadElementReader {
15 public: 15 public:
16 UploadBytesElementReader(const char* bytes, int bytes_length); 16 UploadBytesElementReader(const char* bytes, int bytes_length);
17 virtual ~UploadBytesElementReader(); 17 virtual ~UploadBytesElementReader();
18 18
19 // UploadElementReader overrides: 19 // UploadElementReader overrides:
20 virtual int Init(const CompletionCallback& callback) OVERRIDE;
20 virtual int InitSync() OVERRIDE; 21 virtual int InitSync() OVERRIDE;
21 virtual uint64 GetContentLength() const OVERRIDE; 22 virtual uint64 GetContentLength() const OVERRIDE;
22 virtual uint64 BytesRemaining() const OVERRIDE; 23 virtual uint64 BytesRemaining() const OVERRIDE;
23 virtual int ReadSync(char* buf, int buf_length) OVERRIDE; 24 virtual int ReadSync(char* buf, int buf_length) OVERRIDE;
24 virtual bool IsInMemory() const OVERRIDE; 25 virtual bool IsInMemory() const OVERRIDE;
25 26
26 private: 27 private:
27 const char* bytes_; 28 const char* bytes_;
28 int bytes_length_; 29 int bytes_length_;
29 int offset_; 30 int offset_;
30 31
31 DISALLOW_COPY_AND_ASSIGN(UploadBytesElementReader); 32 DISALLOW_COPY_AND_ASSIGN(UploadBytesElementReader);
32 }; 33 };
33 34
34 } // namespace net 35 } // namespace net
35 36
36 #endif // NET_BASE_UPLOAD_BYTES_ELEMENT_READER_H_ 37 #endif // NET_BASE_UPLOAD_BYTES_ELEMENT_READER_H_
OLDNEW
« no previous file with comments | « chrome_frame/urlmon_upload_data_stream.cc ('k') | net/base/upload_bytes_element_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698