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

Unified Diff: net/test/spawner_communicator.cc

Issue 11419034: net: Move ownership of UploadDataStream from URLRequestHttpJob to URLRequest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix ASAN Created 8 years, 1 month 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/test/spawner_communicator.cc
diff --git a/net/test/spawner_communicator.cc b/net/test/spawner_communicator.cc
index 3a5874a7d08d302239e75bdd695b6b3c68bab576..c94a4c205efa774c6b85d25a88300cbceaddd550 100644
--- a/net/test/spawner_communicator.cc
+++ b/net/test/spawner_communicator.cc
@@ -14,6 +14,7 @@
#include "build/build_config.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
+#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_test_util.h"
@@ -183,7 +184,9 @@ void SpawnerCommunicator::SendCommandAndWaitForResultOnIOThread(
cur_request_->set_method("GET");
} else {
cur_request_->set_method("POST");
- cur_request_->AppendBytesToUpload(post_data.c_str(), post_data.size());
+ scoped_refptr<UploadData> upload_data(new UploadData());
+ upload_data->AppendBytes(post_data.c_str(), post_data.size());
+ cur_request_->set_upload(upload_data);
net::HttpRequestHeaders headers;
headers.SetHeader(net::HttpRequestHeaders::kContentType,
"application/json");

Powered by Google App Engine
This is Rietveld 408576698