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

Side by Side Diff: chrome/browser/net/connection_tester.cc

Issue 10910044: Removed calls to URLRequest::URLRequest in favor of URLRequestContext::CreateRequest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/net/connection_tester.h" 5 #include "chrome/browser/net/connection_tester.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 int status) { 395 int status) {
396 if (status == net::OK) 396 if (status == net::OK)
397 status = request_context_->Init(experiment, 397 status = request_context_->Init(experiment,
398 proxy_config_service, 398 proxy_config_service,
399 net_log_); 399 net_log_);
400 if (status != net::OK) { 400 if (status != net::OK) {
401 tester_->OnExperimentCompleted(status); 401 tester_->OnExperimentCompleted(status);
402 return; 402 return;
403 } 403 }
404 // Fetch a request using the experimental context. 404 // Fetch a request using the experimental context.
405 request_.reset(new net::URLRequest(experiment.url, 405 request_.reset(request_context_->CreateRequest(experiment.url, this));
406 this,
407 request_context_.get()));
408 request_->Start(); 406 request_->Start();
409 } 407 }
410 408
411 void ConnectionTester::TestRunner::Run(const Experiment& experiment) { 409 void ConnectionTester::TestRunner::Run(const Experiment& experiment) {
412 // Try to create a net::URLRequestContext for this experiment. 410 // Try to create a net::URLRequestContext for this experiment.
413 request_context_.reset( 411 request_context_.reset(
414 new ExperimentURLRequestContext(tester_->proxy_request_context_)); 412 new ExperimentURLRequestContext(tester_->proxy_request_context_));
415 scoped_ptr<net::ProxyConfigService>* proxy_config_service = 413 scoped_ptr<net::ProxyConfigService>* proxy_config_service =
416 new scoped_ptr<net::ProxyConfigService>(); 414 new scoped_ptr<net::ProxyConfigService>();
417 base::Callback<void(int)> config_service_callback = 415 base::Callback<void(int)> config_service_callback =
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 524
527 // Notify the delegate of completion. 525 // Notify the delegate of completion.
528 delegate_->OnCompletedConnectionTestExperiment(current, result); 526 delegate_->OnCompletedConnectionTestExperiment(current, result);
529 527
530 if (remaining_experiments_.empty()) { 528 if (remaining_experiments_.empty()) {
531 delegate_->OnCompletedConnectionTestSuite(); 529 delegate_->OnCompletedConnectionTestSuite();
532 } else { 530 } else {
533 StartNextExperiment(); 531 StartNextExperiment();
534 } 532 }
535 } 533 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698