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

Unified Diff: net/url_request/url_request.h

Issue 6134003: Prototype of chunked transfer encoded POST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index f257ed6d6222156edcdd032ba08eb117cf2f3702..3f399a658831a9933b418e31e956e75e6a4f65b0 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -320,6 +320,20 @@ class URLRequest : public base::NonThreadSafe {
AppendFileRangeToUpload(file_path, 0, kuint64max, base::Time());
}
+ // Indicates that the request body should be sent using chunked transfer
+ // encoding. This method may only be called before Start() is called.
+ void EnableChunkedUpload();
+
+ // Appends the given bytes to the request's upload data to be sent
+ // immediately via chunked transfer encoding. When all data has been sent,
+ // call MarkEndOfChunks() to indicate the end of upload data.
+ //
+ // This method may be called only after calling EnableChunkedUpload().
+ void AppendChunkToUpload(const char* bytes, int bytes_len);
+
+ // Indicates the end of a chunked transfer encoded request body.
+ void MarkEndOfChunks();
+
// Set the upload data directly.
void set_upload(net::UploadData* upload);

Powered by Google App Engine
This is Rietveld 408576698