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