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

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: Merged with latest version 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..97647ceab8f65f7f3dbe3dbfd579acebb7ddecfe 100644
--- a/net/test/spawner_communicator.cc
+++ b/net/test/spawner_communicator.cc
@@ -165,8 +165,10 @@ void SpawnerCommunicator::SendCommandAndWaitForResultOnIOThread(
// Prepare the URLRequest for sending the command.
DCHECK(!cur_request_.get());
+ context_.reset(new TestURLRequestContext);
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 +177,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