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

Unified Diff: net/url_request/test_url_fetcher_factory.h

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.h
diff --git a/net/url_request/test_url_fetcher_factory.h b/net/url_request/test_url_fetcher_factory.h
index 27f2f7a90b7adbd73398444284cb61a4ace095fa..d7f0d305481c7e5588c96f8ffa907ea1b2a1ffab 100644
--- a/net/url_request/test_url_fetcher_factory.h
+++ b/net/url_request/test_url_fetcher_factory.h
@@ -81,6 +81,9 @@ class TestURLFetcher : public URLFetcher {
virtual ~TestURLFetcher();
// URLFetcher implementation
+ virtual void SetUploadDataStream(
+ const std::string& upload_content_type,
+ scoped_ptr<UploadDataStream> upload_content) OVERRIDE;
virtual void SetUploadData(const std::string& upload_content_type,
const std::string& upload_content) OVERRIDE;
virtual void SetChunkedUpload(
@@ -145,6 +148,11 @@ class TestURLFetcher : public URLFetcher {
// Unique ID in our factory.
int id() const { return id_; }
+ // Returns the data stream uploaded on this URLFetcher.
+ const UploadDataStream* upload_data_stream() const {
+ return upload_data_stream_.get();
+ }
+
// Returns the data uploaded on this URLFetcher.
const std::string& upload_data() const { return upload_data_; }
@@ -186,6 +194,7 @@ class TestURLFetcher : public URLFetcher {
URLFetcherDelegate* delegate_;
DelegateForTests* delegate_for_tests_;
std::string upload_data_;
+ scoped_ptr<UploadDataStream> upload_data_stream_;
std::list<std::string> chunks_;
bool did_receive_last_chunk_;
« no previous file with comments | « no previous file | net/url_request/test_url_fetcher_factory.cc » ('j') | net/url_request/test_url_fetcher_factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698