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

Unified Diff: net/url_request/url_fetcher_core.h

Issue 12383015: Add SetUploadFilePath method to URLFetcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review changes Created 7 years, 10 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/url_fetcher.h ('k') | net/url_request/url_fetcher_core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher_core.h
diff --git a/net/url_request/url_fetcher_core.h b/net/url_request/url_fetcher_core.h
index 082b994bd44089176f2f983ec5a618c95f974c30..0289f635e24cbd9d99e226d9fcf7dec341c94ba1 100644
--- a/net/url_request/url_fetcher_core.h
+++ b/net/url_request/url_fetcher_core.h
@@ -63,6 +63,9 @@ class URLFetcherCore
// content and set |content| to the data to upload.
void SetUploadData(const std::string& upload_content_type,
const std::string& upload_content);
+ void SetUploadFilePath(const std::string& upload_content_type,
+ const base::FilePath& file_path,
+ scoped_refptr<base::TaskRunner> file_task_runner);
void SetChunkedUpload(const std::string& upload_content_type);
// Adds a block of data to be uploaded in a POST body. This can only be
// called after Start().
@@ -223,8 +226,10 @@ class URLFetcherCore
scoped_refptr<base::SingleThreadTaskRunner> delegate_task_runner_;
// Task runner for the creating thread.
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
- // Task runner for file access.
+ // Task runner for download file access.
scoped_refptr<base::TaskRunner> file_task_runner_;
+ // Task runner for upload file access.
+ scoped_refptr<base::TaskRunner> upload_file_task_runner_;
// Task runner for the thread
// on which file access happens.
scoped_ptr<URLRequest> request_; // The actual request this wraps
@@ -248,6 +253,7 @@ class URLFetcherCore
bool upload_content_set_; // SetUploadData has been called
std::string upload_content_; // HTTP POST payload
+ base::FilePath upload_file_path_; // Path to file containing POST payload
std::string upload_content_type_; // MIME type of POST payload
std::string referrer_; // HTTP Referer header value
bool is_chunked_upload_; // True if using chunked transfer encoding
« no previous file with comments | « net/url_request/url_fetcher.h ('k') | net/url_request/url_fetcher_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698