| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // The rest of the dependencies are standard, and don't depend on the | 51 // The rest of the dependencies are standard, and don't depend on the |
| 52 // experiment being run. | 52 // experiment being run. |
| 53 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); | 53 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); |
| 54 ssl_config_service_ = new net::SSLConfigServiceDefaults; | 54 ssl_config_service_ = new net::SSLConfigServiceDefaults; |
| 55 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); | 55 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); |
| 56 http_transaction_factory_ = | 56 http_transaction_factory_ = |
| 57 new net::HttpCache( | 57 new net::HttpCache( |
| 58 net::HttpNetworkLayer::CreateFactory(NULL, host_resolver_, | 58 net::HttpNetworkLayer::CreateFactory(NULL, host_resolver_, |
| 59 proxy_service_, | 59 proxy_service_, |
| 60 ssl_config_service_, | 60 ssl_config_service_, |
| 61 http_auth_handler_factory_), | 61 http_auth_handler_factory_, |
| 62 NULL), |
| 62 net::HttpCache::DefaultBackend::InMemory(0)); | 63 net::HttpCache::DefaultBackend::InMemory(0)); |
| 63 // In-memory cookie store. | 64 // In-memory cookie store. |
| 64 cookie_store_ = new net::CookieMonster(NULL, NULL); | 65 cookie_store_ = new net::CookieMonster(NULL, NULL); |
| 65 | 66 |
| 66 return net::OK; | 67 return net::OK; |
| 67 } | 68 } |
| 68 | 69 |
| 69 protected: | 70 protected: |
| 70 virtual ~ExperimentURLRequestContext() { | 71 virtual ~ExperimentURLRequestContext() { |
| 71 delete ftp_transaction_factory_; | 72 delete ftp_transaction_factory_; |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 // Notify the delegate of completion. | 395 // Notify the delegate of completion. |
| 395 delegate_->OnCompletedConnectionTestExperiment(current, result); | 396 delegate_->OnCompletedConnectionTestExperiment(current, result); |
| 396 | 397 |
| 397 if (remaining_experiments_.empty()) { | 398 if (remaining_experiments_.empty()) { |
| 398 delegate_->OnCompletedConnectionTestSuite(); | 399 delegate_->OnCompletedConnectionTestSuite(); |
| 399 } else { | 400 } else { |
| 400 StartNextExperiment(); | 401 StartNextExperiment(); |
| 401 } | 402 } |
| 402 } | 403 } |
| 403 | 404 |
| OLD | NEW |