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

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

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r198785) Created 7 years, 7 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 | Annotate | Revision Log
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"
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/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
14 #include "base/threading/thread_restrictions.h" 14 #include "base/threading/thread_restrictions.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 #include "net/base/io_buffer.h" 18 #include "net/base/io_buffer.h"
19 #include "net/base/net_errors.h" 19 #include "net/base/net_errors.h"
20 #include "net/base/net_util.h" 20 #include "net/base/net_util.h"
21 #include "net/cert/cert_verifier.h" 21 #include "net/cert/cert_verifier.h"
22 #include "net/cookies/cookie_monster.h" 22 #include "net/cookies/cookie_monster.h"
23 #include "net/dns/host_resolver.h" 23 #include "net/dns/host_resolver.h"
24 #include "net/ftp/ftp_network_layer.h"
25 #include "net/http/http_auth_handler_factory.h" 24 #include "net/http/http_auth_handler_factory.h"
26 #include "net/http/http_cache.h" 25 #include "net/http/http_cache.h"
27 #include "net/http/http_network_session.h" 26 #include "net/http/http_network_session.h"
28 #include "net/http/http_server_properties_impl.h" 27 #include "net/http/http_server_properties_impl.h"
29 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h" 28 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h"
30 #include "net/proxy/proxy_config_service_fixed.h" 29 #include "net/proxy/proxy_config_service_fixed.h"
31 #include "net/proxy/proxy_script_fetcher_impl.h" 30 #include "net/proxy/proxy_script_fetcher_impl.h"
32 #include "net/proxy/proxy_service.h" 31 #include "net/proxy/proxy_service.h"
33 #include "net/proxy/proxy_service_v8.h" 32 #include "net/proxy/proxy_service_v8.h"
34 #include "net/ssl/ssl_config_service_defaults.h" 33 #include "net/ssl/ssl_config_service_defaults.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 scoped_ptr<net::ProxyService> experiment_proxy_service; 101 scoped_ptr<net::ProxyService> experiment_proxy_service;
103 rv = CreateProxyService(experiment.proxy_settings_experiment, 102 rv = CreateProxyService(experiment.proxy_settings_experiment,
104 proxy_config_service, &experiment_proxy_service); 103 proxy_config_service, &experiment_proxy_service);
105 if (rv != net::OK) 104 if (rv != net::OK)
106 return rv; // Failure. 105 return rv; // Failure.
107 storage_.set_proxy_service(experiment_proxy_service.release()); 106 storage_.set_proxy_service(experiment_proxy_service.release());
108 107
109 // The rest of the dependencies are standard, and don't depend on the 108 // The rest of the dependencies are standard, and don't depend on the
110 // experiment being run. 109 // experiment being run.
111 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); 110 storage_.set_cert_verifier(net::CertVerifier::CreateDefault());
112 #if !defined(DISABLE_FTP_SUPPORT)
113 storage_.set_ftp_transaction_factory(
114 new net::FtpNetworkLayer(host_resolver()));
115 #endif
116 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); 111 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults);
117 storage_.set_http_auth_handler_factory( 112 storage_.set_http_auth_handler_factory(
118 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); 113 net::HttpAuthHandlerFactory::CreateDefault(host_resolver()));
119 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); 114 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl);
120 115
121 net::HttpNetworkSession::Params session_params; 116 net::HttpNetworkSession::Params session_params;
122 session_params.host_resolver = host_resolver(); 117 session_params.host_resolver = host_resolver();
123 session_params.cert_verifier = cert_verifier(); 118 session_params.cert_verifier = cert_verifier();
124 session_params.proxy_service = proxy_service(); 119 session_params.proxy_service = proxy_service();
125 session_params.ssl_config_service = ssl_config_service(); 120 session_params.ssl_config_service = ssl_config_service();
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 533
539 // Notify the delegate of completion. 534 // Notify the delegate of completion.
540 delegate_->OnCompletedConnectionTestExperiment(current, result); 535 delegate_->OnCompletedConnectionTestExperiment(current, result);
541 536
542 if (remaining_experiments_.empty()) { 537 if (remaining_experiments_.empty()) {
543 delegate_->OnCompletedConnectionTestSuite(); 538 delegate_->OnCompletedConnectionTestSuite();
544 } else { 539 } else {
545 StartNextExperiment(); 540 StartNextExperiment();
546 } 541 }
547 } 542 }
OLDNEW
« no previous file with comments | « chrome/browser/net/about_protocol_handler.cc ('k') | chrome/browser/profiles/off_the_record_profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698