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

Unified Diff: net/base/upload_element_reader.h

Issue 11419034: net: Move ownership of UploadDataStream from URLRequestHttpJob to URLRequest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove a local variable Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/upload_data_stream.h ('k') | net/base/upload_element_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/upload_element_reader.h
diff --git a/net/base/upload_element_reader.h b/net/base/upload_element_reader.h
index 1511f74dc16c32980fe57f190322a0434072e195..c7178336d473e0991a26f4da7a1845de8ee0eef0 100644
--- a/net/base/upload_element_reader.h
+++ b/net/base/upload_element_reader.h
@@ -12,7 +12,9 @@
namespace net {
class IOBuffer;
+class UploadBytesElementReader;
class UploadElement;
+class UploadFileElementReader;
// An interface to read an upload data element.
class NET_EXPORT UploadElementReader {
@@ -23,6 +25,14 @@ class NET_EXPORT UploadElementReader {
// Creates an appropriate UploadElementReader instance for the given element.
static UploadElementReader* Create(const UploadElement& element);
+ // Returns this instance's pointer as UploadBytesElementReader when possible,
+ // otherwise returns NULL.
+ virtual const UploadBytesElementReader* AsBytesReader() const;
+
+ // Returns this instance's pointer as UploadFileElementReader when possible,
+ // otherwise returns NULL.
+ virtual const UploadFileElementReader* AsFileReader() const;
+
// Initializes the instance synchronously when possible, otherwise does
// initialization aynschronously, returns ERR_IO_PENDING and runs callback.
// Calling this method again after a Init() success results in resetting the
« no previous file with comments | « net/base/upload_data_stream.h ('k') | net/base/upload_element_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698