OLD | NEW |
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" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "chrome/browser/importer/firefox_proxy_settings.h" | 15 #include "chrome/browser/importer/firefox_proxy_settings.h" |
16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
17 #include "net/base/cert_verifier.h" | |
18 #include "net/base/cookie_monster.h" | 17 #include "net/base/cookie_monster.h" |
19 #include "net/base/host_resolver.h" | 18 #include "net/base/host_resolver.h" |
20 #include "net/base/io_buffer.h" | 19 #include "net/base/io_buffer.h" |
| 20 #include "net/base/multi_threaded_cert_verifier.h" |
21 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
22 #include "net/base/net_util.h" | 22 #include "net/base/net_util.h" |
23 #include "net/base/ssl_config_service_defaults.h" | 23 #include "net/base/ssl_config_service_defaults.h" |
24 #include "net/ftp/ftp_network_layer.h" | 24 #include "net/ftp/ftp_network_layer.h" |
25 #include "net/http/http_auth_handler_factory.h" | 25 #include "net/http/http_auth_handler_factory.h" |
26 #include "net/http/http_cache.h" | 26 #include "net/http/http_cache.h" |
27 #include "net/http/http_network_session.h" | 27 #include "net/http/http_network_session.h" |
28 #include "net/http/http_server_properties_impl.h" | 28 #include "net/http/http_server_properties_impl.h" |
29 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h" | 29 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h" |
30 #include "net/proxy/proxy_config_service_fixed.h" | 30 #include "net/proxy/proxy_config_service_fixed.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Create a custom ProxyService for this this experiment. | 62 // Create a custom ProxyService for this this experiment. |
63 scoped_ptr<net::ProxyService> proxy_service_tmp; | 63 scoped_ptr<net::ProxyService> proxy_service_tmp; |
64 rv = CreateProxyService(experiment.proxy_settings_experiment, | 64 rv = CreateProxyService(experiment.proxy_settings_experiment, |
65 &proxy_service_tmp); | 65 &proxy_service_tmp); |
66 if (rv != net::OK) | 66 if (rv != net::OK) |
67 return rv; // Failure. | 67 return rv; // Failure. |
68 storage_.set_proxy_service(proxy_service_tmp.release()); | 68 storage_.set_proxy_service(proxy_service_tmp.release()); |
69 | 69 |
70 // The rest of the dependencies are standard, and don't depend on the | 70 // The rest of the dependencies are standard, and don't depend on the |
71 // experiment being run. | 71 // experiment being run. |
72 storage_.set_cert_verifier(new net::CertVerifier); | 72 storage_.set_cert_verifier(new net::MultiThreadedCertVerifier); |
73 storage_.set_ftp_transaction_factory( | 73 storage_.set_ftp_transaction_factory( |
74 new net::FtpNetworkLayer(host_resolver())); | 74 new net::FtpNetworkLayer(host_resolver())); |
75 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); | 75 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); |
76 storage_.set_http_auth_handler_factory( | 76 storage_.set_http_auth_handler_factory( |
77 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); | 77 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); |
78 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); | 78 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); |
79 | 79 |
80 net::HttpNetworkSession::Params session_params; | 80 net::HttpNetworkSession::Params session_params; |
81 session_params.host_resolver = host_resolver(); | 81 session_params.host_resolver = host_resolver(); |
82 session_params.cert_verifier = cert_verifier(); | 82 session_params.cert_verifier = cert_verifier(); |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 461 |
462 // Notify the delegate of completion. | 462 // Notify the delegate of completion. |
463 delegate_->OnCompletedConnectionTestExperiment(current, result); | 463 delegate_->OnCompletedConnectionTestExperiment(current, result); |
464 | 464 |
465 if (remaining_experiments_.empty()) { | 465 if (remaining_experiments_.empty()) { |
466 delegate_->OnCompletedConnectionTestSuite(); | 466 delegate_->OnCompletedConnectionTestSuite(); |
467 } else { | 467 } else { |
468 StartNextExperiment(); | 468 StartNextExperiment(); |
469 } | 469 } |
470 } | 470 } |
OLD | NEW |