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 #ifndef CHROME_BROWSER_IO_THREAD_H_ | 5 #ifndef CHROME_BROWSER_IO_THREAD_H_ |
6 #define CHROME_BROWSER_IO_THREAD_H_ | 6 #define CHROME_BROWSER_IO_THREAD_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/prefs/pref_member.h" | 17 #include "base/prefs/pref_member.h" |
18 #include "base/strings/string_piece.h" | 18 #include "base/strings/string_piece.h" |
19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
20 #include "chrome/browser/net/chrome_network_delegate.h" | 20 #include "chrome/browser/net/chrome_network_delegate.h" |
21 #include "chrome/browser/net/ssl_config_service_manager.h" | 21 #include "chrome/browser/net/ssl_config_service_manager.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "content/public/browser/browser_thread_delegate.h" | 23 #include "content/public/browser/browser_thread_delegate.h" |
24 #include "net/base/network_change_notifier.h" | 24 #include "net/base/network_change_notifier.h" |
| 25 #include "net/cert/ct_verifier.h" |
25 #include "net/http/http_network_session.h" | 26 #include "net/http/http_network_session.h" |
26 #include "net/socket/next_proto.h" | 27 #include "net/socket/next_proto.h" |
27 | 28 |
28 class ChromeNetLog; | 29 class ChromeNetLog; |
29 class PrefProxyConfigTracker; | 30 class PrefProxyConfigTracker; |
30 class PrefService; | 31 class PrefService; |
31 class PrefRegistrySimple; | 32 class PrefRegistrySimple; |
32 class SystemURLRequestContextGetter; | 33 class SystemURLRequestContextGetter; |
33 | 34 |
34 namespace base { | 35 namespace base { |
35 class CommandLine; | 36 class CommandLine; |
36 } | 37 } |
37 | 38 |
38 namespace chrome_browser_net { | 39 namespace chrome_browser_net { |
39 class DnsProbeService; | 40 class DnsProbeService; |
40 } | 41 } |
41 | 42 |
42 namespace extensions { | 43 namespace extensions { |
43 class EventRouterForwarder; | 44 class EventRouterForwarder; |
44 } | 45 } |
45 | 46 |
46 namespace net { | 47 namespace net { |
47 class CertPolicyEnforcer; | 48 class CertPolicyEnforcer; |
48 class CertVerifier; | 49 class CertVerifier; |
49 class ChannelIDService; | 50 class ChannelIDService; |
50 class CookieStore; | 51 class CookieStore; |
51 class CTVerifier; | 52 class CTLogVerifier; |
52 class FtpTransactionFactory; | 53 class FtpTransactionFactory; |
53 class HostMappingRules; | 54 class HostMappingRules; |
54 class HostResolver; | 55 class HostResolver; |
55 class HttpAuthHandlerFactory; | 56 class HttpAuthHandlerFactory; |
56 class HttpServerProperties; | 57 class HttpServerProperties; |
57 class HttpTransactionFactory; | 58 class HttpTransactionFactory; |
58 class HttpUserAgentSettings; | 59 class HttpUserAgentSettings; |
59 class NetworkDelegate; | 60 class NetworkDelegate; |
60 class NetworkQualityEstimator; | 61 class NetworkQualityEstimator; |
61 class ProxyConfigService; | 62 class ProxyConfigService; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // The "system" NetworkDelegate, used for Profile-agnostic network events. | 122 // The "system" NetworkDelegate, used for Profile-agnostic network events. |
122 scoped_ptr<net::NetworkDelegate> system_network_delegate; | 123 scoped_ptr<net::NetworkDelegate> system_network_delegate; |
123 scoped_ptr<net::HostResolver> host_resolver; | 124 scoped_ptr<net::HostResolver> host_resolver; |
124 scoped_ptr<net::CertVerifier> cert_verifier; | 125 scoped_ptr<net::CertVerifier> cert_verifier; |
125 // The ChannelIDService must outlive the HttpTransactionFactory. | 126 // The ChannelIDService must outlive the HttpTransactionFactory. |
126 scoped_ptr<net::ChannelIDService> system_channel_id_service; | 127 scoped_ptr<net::ChannelIDService> system_channel_id_service; |
127 // This TransportSecurityState doesn't load or save any state. It's only | 128 // This TransportSecurityState doesn't load or save any state. It's only |
128 // used to enforce pinning for system requests and will only use built-in | 129 // used to enforce pinning for system requests and will only use built-in |
129 // pins. | 130 // pins. |
130 scoped_ptr<net::TransportSecurityState> transport_security_state; | 131 scoped_ptr<net::TransportSecurityState> transport_security_state; |
| 132 std::vector<scoped_refptr<net::CTLogVerifier>> ct_logs; |
131 scoped_ptr<net::CTVerifier> cert_transparency_verifier; | 133 scoped_ptr<net::CTVerifier> cert_transparency_verifier; |
132 scoped_ptr<net::CertPolicyEnforcer> cert_policy_enforcer; | 134 scoped_ptr<net::CertPolicyEnforcer> cert_policy_enforcer; |
133 scoped_refptr<net::SSLConfigService> ssl_config_service; | 135 scoped_refptr<net::SSLConfigService> ssl_config_service; |
134 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory; | 136 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory; |
135 scoped_ptr<net::HttpServerProperties> http_server_properties; | 137 scoped_ptr<net::HttpServerProperties> http_server_properties; |
136 scoped_ptr<net::ProxyService> proxy_script_fetcher_proxy_service; | 138 scoped_ptr<net::ProxyService> proxy_script_fetcher_proxy_service; |
137 scoped_ptr<net::HttpTransactionFactory> | 139 scoped_ptr<net::HttpTransactionFactory> |
138 proxy_script_fetcher_http_transaction_factory; | 140 proxy_script_fetcher_http_transaction_factory; |
139 scoped_ptr<net::FtpTransactionFactory> | 141 scoped_ptr<net::FtpTransactionFactory> |
140 proxy_script_fetcher_ftp_transaction_factory; | 142 proxy_script_fetcher_ftp_transaction_factory; |
141 scoped_ptr<net::URLRequestJobFactory> | 143 scoped_ptr<net::URLRequestJobFactory> |
142 proxy_script_fetcher_url_request_job_factory; | 144 proxy_script_fetcher_url_request_job_factory; |
143 scoped_ptr<net::URLRequestBackoffManager> url_request_backoff_manager; | 145 scoped_ptr<net::URLRequestBackoffManager> url_request_backoff_manager; |
144 scoped_ptr<net::URLSecurityManager> url_security_manager; | 146 scoped_ptr<net::URLSecurityManager> url_security_manager; |
145 // TODO(willchan): Remove proxy script fetcher context since it's not | 147 // TODO(willchan): Remove proxy script fetcher context since it's not |
146 // necessary now that I got rid of refcounting URLRequestContexts. | 148 // necessary now that I got rid of refcounting URLRequestContexts. |
147 // | 149 // |
148 // The first URLRequestContext is |system_url_request_context|. We introduce | 150 // The first URLRequestContext is |system_url_request_context|. We introduce |
149 // |proxy_script_fetcher_context| for the second context. It has a direct | 151 // |proxy_script_fetcher_context| for the second context. It has a direct |
150 // ProxyService, since we always directly connect to fetch the PAC script. | 152 // ProxyService, since we always directly connect to fetch the PAC script. |
151 scoped_ptr<net::URLRequestContext> proxy_script_fetcher_context; | 153 scoped_ptr<net::URLRequestContext> proxy_script_fetcher_context; |
152 scoped_ptr<net::ProxyService> system_proxy_service; | 154 scoped_ptr<net::ProxyService> system_proxy_service; |
153 scoped_ptr<net::HttpTransactionFactory> system_http_transaction_factory; | 155 scoped_ptr<net::HttpTransactionFactory> system_http_transaction_factory; |
154 scoped_ptr<net::URLRequestJobFactory> system_url_request_job_factory; | 156 scoped_ptr<net::URLRequestJobFactory> system_url_request_job_factory; |
155 scoped_ptr<net::URLRequestContext> system_request_context; | 157 scoped_ptr<net::URLRequestContext> system_request_context; |
156 SystemRequestContextLeakChecker system_request_context_leak_checker; | 158 SystemRequestContextLeakChecker system_request_context_leak_checker; |
157 // |system_cookie_store| and |system_channel_id_service| are shared | 159 // |system_cookie_store| and |system_channel_id_service| are shared |
158 // between |proxy_script_fetcher_context| and |system_request_context|. | 160 // between |proxy_script_fetcher_context| and |system_request_context|. |
159 scoped_refptr<net::CookieStore> system_cookie_store; | 161 scoped_refptr<net::CookieStore> system_cookie_store; |
| 162 // |cert_transparency_observer| is shared between |
| 163 // |proxy_script_fetcher_context| and |system_request_context|. Since |
| 164 // it may be performing URLRequests of its own it must be destroyed |
| 165 // before both URLRequestContexts. |
| 166 scoped_ptr<net::CTVerifier::Observer> cert_transparency_observer; |
160 #if defined(ENABLE_EXTENSIONS) | 167 #if defined(ENABLE_EXTENSIONS) |
161 scoped_refptr<extensions::EventRouterForwarder> | 168 scoped_refptr<extensions::EventRouterForwarder> |
162 extension_event_router_forwarder; | 169 extension_event_router_forwarder; |
163 #endif | 170 #endif |
164 scoped_ptr<net::HostMappingRules> host_mapping_rules; | 171 scoped_ptr<net::HostMappingRules> host_mapping_rules; |
165 scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings; | 172 scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings; |
166 scoped_ptr<net::NetworkQualityEstimator> network_quality_estimator; | 173 scoped_ptr<net::NetworkQualityEstimator> network_quality_estimator; |
167 bool ignore_certificate_errors; | 174 bool ignore_certificate_errors; |
168 uint16 testing_fixed_http_port; | 175 uint16 testing_fixed_http_port; |
169 uint16 testing_fixed_https_port; | 176 uint16 testing_fixed_https_port; |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 bool is_quic_allowed_by_policy_; | 489 bool is_quic_allowed_by_policy_; |
483 | 490 |
484 const base::TimeTicks creation_time_; | 491 const base::TimeTicks creation_time_; |
485 | 492 |
486 base::WeakPtrFactory<IOThread> weak_factory_; | 493 base::WeakPtrFactory<IOThread> weak_factory_; |
487 | 494 |
488 DISALLOW_COPY_AND_ASSIGN(IOThread); | 495 DISALLOW_COPY_AND_ASSIGN(IOThread); |
489 }; | 496 }; |
490 | 497 |
491 #endif // CHROME_BROWSER_IO_THREAD_H_ | 498 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |