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

Unified Diff: net/test/spawner_communicator.cc

Issue 11439008: net: Change argument of URLRequest::set_upload from UploadData to UploadDataStream (Closed) Base URL: http://git.chromium.org/chromium/src.git@chunk
Patch Set: Fix android Created 8 years 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/ocsp/nss_ocsp.cc ('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/test/spawner_communicator.cc
diff --git a/net/test/spawner_communicator.cc b/net/test/spawner_communicator.cc
index c94a4c205efa774c6b85d25a88300cbceaddd550..2b7e7fb255b2860457b782ea70793dd320b4ce64 100644
--- a/net/test/spawner_communicator.cc
+++ b/net/test/spawner_communicator.cc
@@ -14,7 +14,8 @@
#include "build/build_config.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
-#include "net/base/upload_data.h"
+#include "net/base/upload_bytes_element_reader.h"
+#include "net/base/upload_data_stream.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_test_util.h"
@@ -184,9 +185,10 @@ void SpawnerCommunicator::SendCommandAndWaitForResultOnIOThread(
cur_request_->set_method("GET");
} else {
cur_request_->set_method("POST");
- scoped_refptr<UploadData> upload_data(new UploadData());
- upload_data->AppendBytes(post_data.c_str(), post_data.size());
- cur_request_->set_upload(upload_data);
+ scoped_ptr<UploadElementReader> reader(
+ UploadOwnedBytesElementReader::CreateWithString(post_data));
+ cur_request_->set_upload(make_scoped_ptr(
+ UploadDataStream::CreateWithReader(reader.Pass(), 0)));
net::HttpRequestHeaders headers;
headers.SetHeader(net::HttpRequestHeaders::kContentType,
"application/json");
« no previous file with comments | « net/ocsp/nss_ocsp.cc ('k') | net/url_request/url_fetcher_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698