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

Unified Diff: net/url_request/test_url_fetcher_factory.cc

Issue 11843003: Add SetUploadDataStream method to URLFetcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & updated for UploadFileElementReader changes 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
Index: net/url_request/test_url_fetcher_factory.cc
diff --git a/net/url_request/test_url_fetcher_factory.cc b/net/url_request/test_url_fetcher_factory.cc
index 08ba483b23a01d29811999120a0c365104a9f561..e645329f7f99c112a3430f7286f279b8caa6b3ff 100644
--- a/net/url_request/test_url_fetcher_factory.cc
+++ b/net/url_request/test_url_fetcher_factory.cc
@@ -11,6 +11,7 @@
#include "base/memory/weak_ptr.h"
#include "base/message_loop.h"
#include "net/base/host_port_pair.h"
+#include "net/base/upload_data_stream.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_fetcher_impl.h"
@@ -52,6 +53,12 @@ TestURLFetcher::~TestURLFetcher() {
owner_->RemoveFetcherFromMap(id_);
}
+void TestURLFetcher::SetUploadDataStream(
+ const std::string& upload_content_type,
+ scoped_ptr<UploadDataStream> upload_content) {
+ upload_data_stream_ = upload_content.Pass();
+}
+
void TestURLFetcher::SetUploadData(const std::string& upload_content_type,
const std::string& upload_content) {
upload_data_ = upload_content;
hashimoto 2013/01/11 06:07:38 Having both upload_data_stream_ and upload_data_ s
mattm 2013/01/11 21:42:02 Thought about that, but wasn't entirely sure what
hashimoto 2013/01/15 06:59:28 I see. Seems all users of this method just want t

Powered by Google App Engine
This is Rietveld 408576698