| 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 DnsRRResolver; |
| 28 class FraudulentCertificateReporter; | 29 class FraudulentCertificateReporter; |
| 29 class FtpTransactionFactory; | 30 class FtpTransactionFactory; |
| 30 class HostResolver; | 31 class HostResolver; |
| 31 class HttpAuthHandlerFactory; | 32 class HttpAuthHandlerFactory; |
| 32 class HttpTransactionFactory; | 33 class HttpTransactionFactory; |
| 33 class NetworkDelegate; | 34 class NetworkDelegate; |
| 34 class OriginBoundCertService; | 35 class OriginBoundCertService; |
| 35 class ProxyService; | 36 class ProxyService; |
| 36 class URLRequest; | 37 class URLRequest; |
| 37 class URLRequestJobFactory; | 38 class URLRequestJobFactory; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 const std::string& referrer_charset() const { return referrer_charset_; } | 183 const std::string& referrer_charset() const { return referrer_charset_; } |
| 183 void set_referrer_charset(const std::string& charset) { | 184 void set_referrer_charset(const std::string& charset) { |
| 184 referrer_charset_ = charset; | 185 referrer_charset_ = charset; |
| 185 } | 186 } |
| 186 | 187 |
| 187 const URLRequestJobFactory* job_factory() const { return job_factory_; } | 188 const URLRequestJobFactory* job_factory() const { return job_factory_; } |
| 188 void set_job_factory(const URLRequestJobFactory* job_factory) { | 189 void set_job_factory(const URLRequestJobFactory* job_factory) { |
| 189 job_factory_ = job_factory; | 190 job_factory_ = job_factory; |
| 190 } | 191 } |
| 191 | 192 |
| 193 DnsRRResolver* dnsrr_resolver() const { return dnsrr_resolver_.get(); } |
| 194 |
| 192 protected: | 195 protected: |
| 193 friend class base::RefCountedThreadSafe<URLRequestContext>; | 196 friend class base::RefCountedThreadSafe<URLRequestContext>; |
| 194 | 197 |
| 195 virtual ~URLRequestContext(); | 198 virtual ~URLRequestContext(); |
| 196 | 199 |
| 197 private: | 200 private: |
| 198 base::WeakPtrFactory<URLRequestContext> weak_factory_; | 201 base::WeakPtrFactory<URLRequestContext> weak_factory_; |
| 199 | 202 |
| 200 // --------------------------------------------------------------------------- | 203 // --------------------------------------------------------------------------- |
| 201 // Important: When adding any new members below, consider whether they need to | 204 // Important: When adding any new members below, consider whether they need to |
| (...skipping 17 matching lines...) Expand all Loading... |
| 219 scoped_ptr<FtpAuthCache> ftp_auth_cache_; | 222 scoped_ptr<FtpAuthCache> ftp_auth_cache_; |
| 220 std::string accept_language_; | 223 std::string accept_language_; |
| 221 std::string accept_charset_; | 224 std::string accept_charset_; |
| 222 // The charset of the referrer where this request comes from. It's not | 225 // The charset of the referrer where this request comes from. It's not |
| 223 // used in communication with a server but is used to construct a suggested | 226 // used in communication with a server but is used to construct a suggested |
| 224 // filename for file download. | 227 // filename for file download. |
| 225 std::string referrer_charset_; | 228 std::string referrer_charset_; |
| 226 HttpTransactionFactory* http_transaction_factory_; | 229 HttpTransactionFactory* http_transaction_factory_; |
| 227 FtpTransactionFactory* ftp_transaction_factory_; | 230 FtpTransactionFactory* ftp_transaction_factory_; |
| 228 const URLRequestJobFactory* job_factory_; | 231 const URLRequestJobFactory* job_factory_; |
| 232 scoped_ptr<DnsRRResolver> dnsrr_resolver_; |
| 229 | 233 |
| 230 // --------------------------------------------------------------------------- | 234 // --------------------------------------------------------------------------- |
| 231 // Important: When adding any new members below, consider whether they need to | 235 // Important: When adding any new members below, consider whether they need to |
| 232 // be added to CopyFrom. | 236 // be added to CopyFrom. |
| 233 // --------------------------------------------------------------------------- | 237 // --------------------------------------------------------------------------- |
| 234 | 238 |
| 235 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 239 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 236 }; | 240 }; |
| 237 | 241 |
| 238 } // namespace net | 242 } // namespace net |
| 239 | 243 |
| 240 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 244 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |