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

Unified Diff: net/url_request/url_fetcher.h

Issue 11843003: Add SetUploadDataStream method to URLFetcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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
« no previous file with comments | « net/url_request/test_url_fetcher_factory.cc ('k') | net/url_request/url_fetcher_core.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher.h
diff --git a/net/url_request/url_fetcher.h b/net/url_request/url_fetcher.h
index 79bbd173f05e5d9d59a7141f888298dcfdebde8a..211994dd59079a12c589494f4dbe32eee540c6f0 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,9 +118,15 @@ 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;
+
+ // 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;
« no previous file with comments | « net/url_request/test_url_fetcher_factory.cc ('k') | net/url_request/url_fetcher_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698