OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This class represents contextual information (cookies, cache, etc.) | 5 // This class represents contextual information (cookies, cache, etc.) |
6 // that's useful when processing resource requests. | 6 // that's useful when processing resource requests. |
7 // The class is reference-counted so that it can be cleaned up after any | 7 // The class is reference-counted so that it can be cleaned up after any |
8 // requests that are using it have been completed. | 8 // requests that are using it have been completed. |
9 | 9 |
10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
11 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 11 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
12 #pragma once | 12 #pragma once |
13 | 13 |
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/threading/non_thread_safe.h" | 17 #include "base/threading/non_thread_safe.h" |
18 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
19 #include "net/base/net_log.h" | 19 #include "net/base/net_log.h" |
20 #include "net/base/ssl_config_service.h" | 20 #include "net/base/ssl_config_service.h" |
21 #include "net/base/transport_security_state.h" | 21 #include "net/base/transport_security_state.h" |
22 #include "net/http/http_server_properties.h" | 22 #include "net/http/http_server_properties.h" |
23 #include "net/ftp/ftp_auth_cache.h" | 23 #include "net/ftp/ftp_auth_cache.h" |
24 | 24 |
25 namespace net { | 25 namespace net { |
26 class CertVerifier; | 26 class CertVerifier; |
27 class CookieStore; | 27 class CookieStore; |
28 class DnsCertProvenanceChecker; | 28 class DnsCertProvenanceChecker; |
29 class DnsRRResolver; | |
30 class FraudulentCertificateReporter; | 29 class FraudulentCertificateReporter; |
31 class FtpTransactionFactory; | 30 class FtpTransactionFactory; |
32 class HostResolver; | 31 class HostResolver; |
33 class HttpAuthHandlerFactory; | 32 class HttpAuthHandlerFactory; |
34 class HttpTransactionFactory; | 33 class HttpTransactionFactory; |
35 class NetworkDelegate; | 34 class NetworkDelegate; |
36 class OriginBoundCertService; | 35 class OriginBoundCertService; |
37 class ProxyService; | 36 class ProxyService; |
38 class URLRequest; | 37 class URLRequest; |
39 class URLRequestJobFactory; | 38 class URLRequestJobFactory; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 80 |
82 OriginBoundCertService* origin_bound_cert_service() const { | 81 OriginBoundCertService* origin_bound_cert_service() const { |
83 return origin_bound_cert_service_; | 82 return origin_bound_cert_service_; |
84 } | 83 } |
85 | 84 |
86 void set_origin_bound_cert_service( | 85 void set_origin_bound_cert_service( |
87 OriginBoundCertService* origin_bound_cert_service) { | 86 OriginBoundCertService* origin_bound_cert_service) { |
88 origin_bound_cert_service_ = origin_bound_cert_service; | 87 origin_bound_cert_service_ = origin_bound_cert_service; |
89 } | 88 } |
90 | 89 |
91 DnsRRResolver* dnsrr_resolver() const { | |
92 return dnsrr_resolver_; | |
93 } | |
94 | |
95 void set_dnsrr_resolver(DnsRRResolver* dnsrr_resolver) { | |
96 dnsrr_resolver_ = dnsrr_resolver; | |
97 } | |
98 | |
99 DnsCertProvenanceChecker* dns_cert_checker() const { | 90 DnsCertProvenanceChecker* dns_cert_checker() const { |
100 return dns_cert_checker_; | 91 return dns_cert_checker_; |
101 } | 92 } |
102 void set_dns_cert_checker(DnsCertProvenanceChecker* dns_cert_checker) { | 93 void set_dns_cert_checker(DnsCertProvenanceChecker* dns_cert_checker) { |
103 dns_cert_checker_ = dns_cert_checker; | 94 dns_cert_checker_ = dns_cert_checker; |
104 } | 95 } |
105 | 96 |
106 FraudulentCertificateReporter* fraudulent_certificate_reporter() const { | 97 FraudulentCertificateReporter* fraudulent_certificate_reporter() const { |
107 return fraudulent_certificate_reporter_; | 98 return fraudulent_certificate_reporter_; |
108 } | 99 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // Important: When adding any new members below, consider whether they need to | 209 // Important: When adding any new members below, consider whether they need to |
219 // be added to CopyFrom. | 210 // be added to CopyFrom. |
220 // --------------------------------------------------------------------------- | 211 // --------------------------------------------------------------------------- |
221 | 212 |
222 // Ownership for these members are not defined here. Clients should either | 213 // Ownership for these members are not defined here. Clients should either |
223 // provide storage elsewhere or have a subclass take ownership. | 214 // provide storage elsewhere or have a subclass take ownership. |
224 NetLog* net_log_; | 215 NetLog* net_log_; |
225 HostResolver* host_resolver_; | 216 HostResolver* host_resolver_; |
226 CertVerifier* cert_verifier_; | 217 CertVerifier* cert_verifier_; |
227 OriginBoundCertService* origin_bound_cert_service_; | 218 OriginBoundCertService* origin_bound_cert_service_; |
228 DnsRRResolver* dnsrr_resolver_; | |
229 DnsCertProvenanceChecker* dns_cert_checker_; | 219 DnsCertProvenanceChecker* dns_cert_checker_; |
230 FraudulentCertificateReporter* fraudulent_certificate_reporter_; | 220 FraudulentCertificateReporter* fraudulent_certificate_reporter_; |
231 HttpAuthHandlerFactory* http_auth_handler_factory_; | 221 HttpAuthHandlerFactory* http_auth_handler_factory_; |
232 ProxyService* proxy_service_; | 222 ProxyService* proxy_service_; |
233 scoped_refptr<SSLConfigService> ssl_config_service_; | 223 scoped_refptr<SSLConfigService> ssl_config_service_; |
234 NetworkDelegate* network_delegate_; | 224 NetworkDelegate* network_delegate_; |
235 HttpServerProperties* http_server_properties_; | 225 HttpServerProperties* http_server_properties_; |
236 scoped_refptr<CookieStore> cookie_store_; | 226 scoped_refptr<CookieStore> cookie_store_; |
237 TransportSecurityState* transport_security_state_; | 227 TransportSecurityState* transport_security_state_; |
238 scoped_ptr<FtpAuthCache> ftp_auth_cache_; | 228 scoped_ptr<FtpAuthCache> ftp_auth_cache_; |
(...skipping 11 matching lines...) Expand all Loading... |
250 // Important: When adding any new members below, consider whether they need to | 240 // Important: When adding any new members below, consider whether they need to |
251 // be added to CopyFrom. | 241 // be added to CopyFrom. |
252 // --------------------------------------------------------------------------- | 242 // --------------------------------------------------------------------------- |
253 | 243 |
254 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 244 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
255 }; | 245 }; |
256 | 246 |
257 } // namespace net | 247 } // namespace net |
258 | 248 |
259 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 249 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |