Chromium Code Reviews| Index: net/url_request/url_fetcher.h |
| diff --git a/net/url_request/url_fetcher.h b/net/url_request/url_fetcher.h |
| index 5dcaedde0a9d7945a10bf9f2c40d0a086a8960d1..3709609f4356c41b077dd749c4a659752834040d 100644 |
| --- a/net/url_request/url_fetcher.h |
| +++ b/net/url_request/url_fetcher.h |
| @@ -92,6 +92,12 @@ class NET_EXPORT URLFetcher { |
| // base::SupportsUserData::Data object every time it's called. |
| typedef base::Callback<base::SupportsUserData::Data*()> CreateDataCallback; |
| + // Used by SetUploadStreamFactory. The callback should assign content type and |
| + // a |
|
mmenke
2015/01/09 17:42:25
The callback should not assign content type - that
hirono
2015/01/15 08:14:27
Done.
|
| + // fresh upload data stream every time it's called. |
|
mmenke
2015/01/09 17:42:25
Nit: Merge lines
hirono
2015/01/15 08:14:27
Done.
|
| + typedef base::Callback<scoped_ptr<UploadDataStream>()> |
| + CreateUploadStreamCallback; |
| + |
| virtual ~URLFetcher(); |
| // |url| is the URL to send the request to. |
| @@ -149,6 +155,15 @@ class NET_EXPORT URLFetcher { |
| uint64 range_length, |
| scoped_refptr<base::TaskRunner> file_task_runner) = 0; |
| + // Sets data only needed by POSTs. All callers making POST requests should |
| + // call one of the SetUpload* methods before the request is started. |
| + // |upload_content_type| is the MIME type of the content, while |
| + // |upload_stream| is the data to be sent (the Content-Length header value |
| + // will be set to the length of this data). |
|
mmenke
2015/01/09 17:42:24
There is no |upload_stream|. Should say something
hirono
2015/01/15 08:14:27
Done.
|
| + virtual void SetUploadStreamFactory( |
| + const std::string& upload_content_type, |
| + const CreateUploadStreamCallback& callback) = 0; |
| + |
| // Indicates that the POST data is sent via chunked transfer encoding. |
| // This may only be called before calling Start(). |
| // Use AppendChunkToUpload() to give the data chunks after calling Start(). |