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_api.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/ftp/ftp_auth_cache.h" | 22 #include "net/ftp/ftp_auth_cache.h" |
23 | 23 |
24 namespace net { | 24 namespace net { |
25 class CertVerifier; | 25 class CertVerifier; |
26 class CookieStore; | 26 class CookieStore; |
27 class DnsCertProvenanceChecker; | 27 class DnsCertProvenanceChecker; |
28 class DnsRRResolver; | 28 class DnsRRResolver; |
29 class FtpTransactionFactory; | 29 class FtpTransactionFactory; |
30 class HostResolver; | 30 class HostResolver; |
31 class HttpAuthHandlerFactory; | 31 class HttpAuthHandlerFactory; |
32 class HttpTransactionFactory; | 32 class HttpTransactionFactory; |
33 class NetworkDelegate; | 33 class NetworkDelegate; |
34 class OriginBoundCertService; | 34 class OriginBoundCertService; |
35 class ProxyService; | 35 class ProxyService; |
36 class URLRequest; | 36 class URLRequest; |
37 class URLRequestJobFactory; | 37 class URLRequestJobFactory; |
38 | 38 |
39 // Subclass to provide application-specific context for URLRequest | 39 // Subclass to provide application-specific context for URLRequest |
40 // instances. Note that URLRequestContext typically does not provide storage for | 40 // instances. Note that URLRequestContext typically does not provide storage for |
41 // these member variables, since they may be shared. For the ones that aren't | 41 // these member variables, since they may be shared. For the ones that aren't |
42 // shared, URLRequestContextStorage can be helpful in defining their storage. | 42 // shared, URLRequestContextStorage can be helpful in defining their storage. |
43 class NET_API URLRequestContext | 43 class NET_EXPORT URLRequestContext |
44 : public base::RefCountedThreadSafe<URLRequestContext>, | 44 : public base::RefCountedThreadSafe<URLRequestContext>, |
45 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 45 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
46 public: | 46 public: |
47 URLRequestContext(); | 47 URLRequestContext(); |
48 | 48 |
49 base::WeakPtr<URLRequestContext> GetWeakPtr() { | 49 base::WeakPtr<URLRequestContext> GetWeakPtr() { |
50 return weak_factory_.GetWeakPtr(); | 50 return weak_factory_.GetWeakPtr(); |
51 } | 51 } |
52 | 52 |
53 // Copies the state from |other| into this context. | 53 // Copies the state from |other| into this context. |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 // Important: When adding any new members below, consider whether they need to | 229 // Important: When adding any new members below, consider whether they need to |
230 // be added to CopyFrom. | 230 // be added to CopyFrom. |
231 // --------------------------------------------------------------------------- | 231 // --------------------------------------------------------------------------- |
232 | 232 |
233 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 233 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
234 }; | 234 }; |
235 | 235 |
236 } // namespace net | 236 } // namespace net |
237 | 237 |
238 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 238 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |