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/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
| 16 #include "net/base/net_api.h" |
16 #include "net/base/net_log.h" | 17 #include "net/base/net_log.h" |
17 #include "net/base/ssl_config_service.h" | 18 #include "net/base/ssl_config_service.h" |
18 #include "net/base/transport_security_state.h" | 19 #include "net/base/transport_security_state.h" |
19 #include "net/ftp/ftp_auth_cache.h" | 20 #include "net/ftp/ftp_auth_cache.h" |
20 #include "net/socket/dns_cert_provenance_checker.h" | 21 #include "net/socket/dns_cert_provenance_checker.h" |
21 | 22 |
22 namespace net { | 23 namespace net { |
23 class CertVerifier; | 24 class CertVerifier; |
24 class CookieStore; | 25 class CookieStore; |
25 class DnsCertProvenanceChecker; | 26 class DnsCertProvenanceChecker; |
26 class DnsRRResolver; | 27 class DnsRRResolver; |
27 class FtpTransactionFactory; | 28 class FtpTransactionFactory; |
28 class HostResolver; | 29 class HostResolver; |
29 class HttpAuthHandlerFactory; | 30 class HttpAuthHandlerFactory; |
30 class HttpTransactionFactory; | 31 class HttpTransactionFactory; |
31 class NetworkDelegate; | 32 class NetworkDelegate; |
32 class ProxyService; | 33 class ProxyService; |
33 class SSLConfigService; | 34 class SSLConfigService; |
34 class URLRequest; | 35 class URLRequest; |
35 class URLRequestJobFactory; | 36 class URLRequestJobFactory; |
36 | 37 |
37 // Subclass to provide application-specific context for URLRequest | 38 // Subclass to provide application-specific context for URLRequest |
38 // instances. Note that URLRequestContext typically does not provide storage for | 39 // instances. Note that URLRequestContext typically does not provide storage for |
39 // these member variables, since they may be shared. For the ones that aren't | 40 // these member variables, since they may be shared. For the ones that aren't |
40 // shared, URLRequestContextStorage can be helpful in defining their storage. | 41 // shared, URLRequestContextStorage can be helpful in defining their storage. |
41 class URLRequestContext | 42 class NET_API URLRequestContext |
42 : public base::RefCountedThreadSafe<URLRequestContext>, | 43 : public base::RefCountedThreadSafe<URLRequestContext>, |
43 public base::NonThreadSafe { | 44 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
44 public: | 45 public: |
45 URLRequestContext(); | 46 URLRequestContext(); |
46 | 47 |
47 // Copies the state from |other| into this context. | 48 // Copies the state from |other| into this context. |
48 void CopyFrom(URLRequestContext* other); | 49 void CopyFrom(URLRequestContext* other); |
49 | 50 |
50 NetLog* net_log() const { | 51 NetLog* net_log() const { |
51 return net_log_; | 52 return net_log_; |
52 } | 53 } |
53 | 54 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // Important: When adding any new members below, consider whether they need to | 213 // Important: When adding any new members below, consider whether they need to |
213 // be added to CopyFrom. | 214 // be added to CopyFrom. |
214 // --------------------------------------------------------------------------- | 215 // --------------------------------------------------------------------------- |
215 | 216 |
216 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 217 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
217 }; | 218 }; |
218 | 219 |
219 } // namespace net | 220 } // namespace net |
220 | 221 |
221 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 222 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |