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 37aba0277640290120f56cc47248806b9ca74648..d75d7f8ebbf718ccccbe25bca33d09fab6d0eedf 100644 |
| --- a/net/url_request/url_fetcher.h |
| +++ b/net/url_request/url_fetcher.h |
| @@ -10,6 +10,7 @@ |
| #include "base/callback_forward.h" |
| #include "base/memory/ref_counted.h" |
| +#include "base/memory/scoped_ptr.h" |
| #include "base/platform_file.h" |
| #include "base/supports_user_data.h" |
| #include "base/task_runner.h" |
| @@ -27,6 +28,7 @@ namespace net { |
| class HostPortPair; |
| class HttpRequestHeaders; |
| class HttpResponseHeaders; |
| +class UploadDataStream; |
| class URLFetcherDelegate; |
| class URLRequestContextGetter; |
| class URLRequestStatus; |
| @@ -116,12 +118,18 @@ class NET_EXPORT URLFetcher { |
| static void SetEnableInterceptionForTests(bool enabled); |
| // Sets data only needed by POSTs. All callers making POST requests should |
| - // call this before the request is started. |upload_content_type| is the MIME |
| - // type of the content, while |upload_content| is the data to be sent (the |
| - // Content-Length header value will be set to the length of this data). |
| + // call one of the SetUploadData* methods before the request is started. |
| + // |upload_content_type| is the MIME type of the content, while |
| + // |upload_content| is the data to be sent. |
| + virtual void SetUploadDataStream( |
| + const std::string& upload_content_type, |
| + scoped_ptr<UploadDataStream> upload_content) = 0; |
|
hashimoto
2013/01/11 06:07:38
nit: blank line here?
mattm
2013/01/11 21:42:02
Done.
|
| + // Convenience method for setting upload data from a string. |
| + // (the Content-Length header value will be set to the length of this data). |
| virtual void SetUploadData(const std::string& upload_content_type, |
| const std::string& upload_content) = 0; |
| + |
|
hashimoto
2013/01/11 06:07:38
nit: No need to have a blank line here.
mattm
2013/01/11 21:42:02
Done.
|
| // 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(). |