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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 dnsrr_resolver_ = new net::DnsRRResolver; | 61 dnsrr_resolver_ = new net::DnsRRResolver; |
62 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); | 62 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); |
63 ssl_config_service_ = new net::SSLConfigServiceDefaults; | 63 ssl_config_service_ = new net::SSLConfigServiceDefaults; |
64 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault( | 64 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault( |
65 host_resolver_); | 65 host_resolver_); |
66 http_transaction_factory_ = new net::HttpCache( | 66 http_transaction_factory_ = new net::HttpCache( |
67 net::HttpNetworkLayer::CreateFactory(host_resolver_, dnsrr_resolver_, | 67 net::HttpNetworkLayer::CreateFactory(host_resolver_, dnsrr_resolver_, |
68 NULL /* dns_cert_checker */, | 68 NULL /* dns_cert_checker */, |
69 NULL /* ssl_host_info_factory */, proxy_service_, | 69 NULL /* ssl_host_info_factory */, proxy_service_, |
70 ssl_config_service_, http_auth_handler_factory_, NULL, NULL), | 70 ssl_config_service_, http_auth_handler_factory_, NULL, NULL), |
71 net::HttpCache::DefaultBackend::InMemory(0)); | 71 net::HttpCache::DefaultBackend::InMemory(0), |
| 72 NULL); |
72 // In-memory cookie store. | 73 // In-memory cookie store. |
73 cookie_store_ = new net::CookieMonster(NULL, NULL); | 74 cookie_store_ = new net::CookieMonster(NULL, NULL); |
74 | 75 |
75 return net::OK; | 76 return net::OK; |
76 } | 77 } |
77 | 78 |
78 protected: | 79 protected: |
79 virtual ~ExperimentURLRequestContext() { | 80 virtual ~ExperimentURLRequestContext() { |
80 delete ftp_transaction_factory_; | 81 delete ftp_transaction_factory_; |
81 delete http_transaction_factory_; | 82 delete http_transaction_factory_; |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 | 413 |
413 // Notify the delegate of completion. | 414 // Notify the delegate of completion. |
414 delegate_->OnCompletedConnectionTestExperiment(current, result); | 415 delegate_->OnCompletedConnectionTestExperiment(current, result); |
415 | 416 |
416 if (remaining_experiments_.empty()) { | 417 if (remaining_experiments_.empty()) { |
417 delegate_->OnCompletedConnectionTestSuite(); | 418 delegate_->OnCompletedConnectionTestSuite(); |
418 } else { | 419 } else { |
419 StartNextExperiment(); | 420 StartNextExperiment(); |
420 } | 421 } |
421 } | 422 } |
OLD | NEW |