Chromium Code Reviews| Index: net/url_request/url_request.h |
| diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h |
| index 3561a294624dccccc8eeb5d653a794eb13b10034..0b669cd4085d6a3a290dc02d74eda4893821cd89 100644 |
| --- a/net/url_request/url_request.h |
| +++ b/net/url_request/url_request.h |
| @@ -312,6 +312,18 @@ class URLRequest : public base::NonThreadSafe { |
| AppendFileRangeToUpload(file_path, 0, kuint64max, base::Time()); |
| } |
| + // Appends the given bytes to the requests's POST data to be sent immediately |
| + // and indicates that more data is yet to come. This is useful when the POST |
| + // data is not available upfront when establishing the connection and as the |
| + // data becomes available it can be sent to the server. |
|
wtc
2011/01/14 03:09:31
Nit: change "POST data" to "upload data" (two occu
Satish
2011/01/14 18:09:29
Done.
|
| + // |
| + // This method can be called only after a call to |set_chunked_upload(true)| |
|
wtc
2011/01/14 03:09:31
Typo: your set_chunked_upload method takes no argu
Satish
2011/01/14 18:09:29
Done.
|
| + // and |Start()|. |
| + void AppendChunkToUpload(const char* bytes, int bytes_len); |
|
vandebo (ex-Chrome)
2011/01/14 05:53:44
This method seems different than the other AppendF
Satish
2011/01/14 18:09:29
Looking at the implementation I don't see why this
|
| + |
| + // Indicate the end of a chunked-transfer encoded request body. |
|
wtc
2011/01/14 03:09:31
Nit: Indicate => Indicates
Satish
2011/01/14 18:09:29
Done.
|
| + void MarkEndOfChunks(); |
|
vandebo (ex-Chrome)
2011/01/14 05:53:44
Is it really worthwhile to provide this method? W
Satish
2011/01/14 18:09:29
The consumers of this class don't have to know abo
|
| + |
| // Set the upload data directly. |
| void set_upload(net::UploadData* upload); |
| @@ -429,6 +441,10 @@ class URLRequest : public base::NonThreadSafe { |
| int load_flags() const { return load_flags_; } |
| void set_load_flags(int flags) { load_flags_ = flags; } |
| + // Indicates that the request body should be sent using Chunked-Transfer |
| + // encoding. |
| + void set_chunked_upload() { is_chunked_upload_ = true; } |
|
wtc
2011/01/14 03:09:31
Nit: set_chunked_upload => enable_chunked_upload
vandebo (ex-Chrome)
2011/01/14 05:53:44
It seems that this logically belongs with the othe
Satish
2011/01/14 18:09:29
Renamed to EnableChunkedUpload(), moved to .cc fil
|
| + |
| // Returns true if the request is "pending" (i.e., if Start() has been called, |
| // and the response has not yet been called). |
| bool is_pending() const { return is_pending_; } |
| @@ -626,6 +642,10 @@ class URLRequest : public base::NonThreadSafe { |
| // Whether to enable performance profiling on the job serving this request. |
| bool enable_profiling_; |
| + // Whether the upload data contains chunks of data (sent via |
| + // Chunked-Transfer encoding). |
| + bool is_chunked_upload_; |
| + |
| // Number of times we're willing to redirect. Used to guard against |
| // infinite redirects. |
| int redirect_limit_; |