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

Unified Diff: net/test/spawner_communicator.cc

Issue 10559036: Added URLRequestContext to constructor for URLRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Converted new unittest. Created 8 years, 6 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/test/spawner_communicator.cc
diff --git a/net/test/spawner_communicator.cc b/net/test/spawner_communicator.cc
index af20887a14dcfc02319452aa9603f7bcdce950b0..d8e2e58c8e08e2e01c39cd490c69ce7d7be6560e 100644
--- a/net/test/spawner_communicator.cc
+++ b/net/test/spawner_communicator.cc
@@ -163,10 +163,13 @@ void SpawnerCommunicator::SendCommandAndWaitForResultOnIOThread(
DCHECK(loop);
DCHECK_EQ(MessageLoop::current(), loop);
+ context_.reset(new TestURLRequestContext);
+
// Prepare the URLRequest for sending the command.
DCHECK(!cur_request_.get());
mmenke 2012/06/20 18:33:50 Put this first, so the DCHECK occurs before the li
shalev 2012/06/20 20:13:12 Done.
shalev 2012/06/20 20:13:12 Done.
cur_request_.reset(new URLRequest(GenerateSpawnerCommandURL(command, port_),
- this));
+ this,
+ context_.get()));
DCHECK(cur_request_.get());
int current_request_id = ++next_id_;
SpawnerRequestData* data = new SpawnerRequestData(current_request_id,
@@ -175,9 +178,6 @@ void SpawnerCommunicator::SendCommandAndWaitForResultOnIOThread(
DCHECK(data);
cur_request_->SetUserData(this, data);
- // Build the URLRequest.
- context_.reset(new TestURLRequestContext);
- cur_request_->set_context(context_.get());
if (post_data.empty()) {
cur_request_->set_method("GET");
} else {

Powered by Google App Engine
This is Rietveld 408576698