| 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_ |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 return dnsrr_resolver_; | 75 return dnsrr_resolver_; |
| 76 } | 76 } |
| 77 | 77 |
| 78 void set_dnsrr_resolver(DnsRRResolver* dnsrr_resolver) { | 78 void set_dnsrr_resolver(DnsRRResolver* dnsrr_resolver) { |
| 79 dnsrr_resolver_ = dnsrr_resolver; | 79 dnsrr_resolver_ = dnsrr_resolver; |
| 80 } | 80 } |
| 81 | 81 |
| 82 DnsCertProvenanceChecker* dns_cert_checker() const { | 82 DnsCertProvenanceChecker* dns_cert_checker() const { |
| 83 return dns_cert_checker_; | 83 return dns_cert_checker_; |
| 84 } | 84 } |
| 85 void set_dns_cert_checker(net::DnsCertProvenanceChecker* dns_cert_checker) { | 85 void set_dns_cert_checker(DnsCertProvenanceChecker* dns_cert_checker) { |
| 86 dns_cert_checker_ = dns_cert_checker; | 86 dns_cert_checker_ = dns_cert_checker; |
| 87 } | 87 } |
| 88 | 88 |
| 89 // Get the proxy service for this context. | 89 // Get the proxy service for this context. |
| 90 ProxyService* proxy_service() const { return proxy_service_; } | 90 ProxyService* proxy_service() const { return proxy_service_; } |
| 91 void set_proxy_service(ProxyService* proxy_service) { | 91 void set_proxy_service(ProxyService* proxy_service) { |
| 92 proxy_service_ = proxy_service; | 92 proxy_service_ = proxy_service; |
| 93 } | 93 } |
| 94 | 94 |
| 95 // Get the ssl config service for this context. | 95 // Get the ssl config service for this context. |
| 96 SSLConfigService* ssl_config_service() const { return ssl_config_service_; } | 96 SSLConfigService* ssl_config_service() const { return ssl_config_service_; } |
| 97 void set_ssl_config_service(net::SSLConfigService* service) { | 97 void set_ssl_config_service(SSLConfigService* service) { |
| 98 ssl_config_service_ = service; | 98 ssl_config_service_ = service; |
| 99 } | 99 } |
| 100 | 100 |
| 101 // Gets the HTTP Authentication Handler Factory for this context. | 101 // Gets the HTTP Authentication Handler Factory for this context. |
| 102 // The factory is only valid for the lifetime of this URLRequestContext | 102 // The factory is only valid for the lifetime of this URLRequestContext |
| 103 HttpAuthHandlerFactory* http_auth_handler_factory() { | 103 HttpAuthHandlerFactory* http_auth_handler_factory() { |
| 104 return http_auth_handler_factory_; | 104 return http_auth_handler_factory_; |
| 105 } | 105 } |
| 106 void set_http_auth_handler_factory(HttpAuthHandlerFactory* factory) { | 106 void set_http_auth_handler_factory(HttpAuthHandlerFactory* factory) { |
| 107 http_auth_handler_factory_ = factory; | 107 http_auth_handler_factory_ = factory; |
| 108 } | 108 } |
| 109 | 109 |
| 110 // Gets the http transaction factory for this context. | 110 // Gets the http transaction factory for this context. |
| 111 HttpTransactionFactory* http_transaction_factory() const { | 111 HttpTransactionFactory* http_transaction_factory() const { |
| 112 return http_transaction_factory_; | 112 return http_transaction_factory_; |
| 113 } | 113 } |
| 114 void set_http_transaction_factory(HttpTransactionFactory* factory) { | 114 void set_http_transaction_factory(HttpTransactionFactory* factory) { |
| 115 http_transaction_factory_ = factory; | 115 http_transaction_factory_ = factory; |
| 116 } | 116 } |
| 117 | 117 |
| 118 // Gets the ftp transaction factory for this context. | 118 // Gets the ftp transaction factory for this context. |
| 119 FtpTransactionFactory* ftp_transaction_factory() { | 119 FtpTransactionFactory* ftp_transaction_factory() { |
| 120 return ftp_transaction_factory_; | 120 return ftp_transaction_factory_; |
| 121 } | 121 } |
| 122 void set_ftp_transaction_factory(net::FtpTransactionFactory* factory) { | 122 void set_ftp_transaction_factory(FtpTransactionFactory* factory) { |
| 123 ftp_transaction_factory_ = factory; | 123 ftp_transaction_factory_ = factory; |
| 124 } | 124 } |
| 125 | 125 |
| 126 void set_network_delegate(NetworkDelegate* network_delegate) { | 126 void set_network_delegate(NetworkDelegate* network_delegate) { |
| 127 network_delegate_ = network_delegate; | 127 network_delegate_ = network_delegate; |
| 128 } | 128 } |
| 129 NetworkDelegate* network_delegate() const { return network_delegate_; } | 129 NetworkDelegate* network_delegate() const { return network_delegate_; } |
| 130 | 130 |
| 131 // Gets the cookie store for this context (may be null, in which case | 131 // Gets the cookie store for this context (may be null, in which case |
| 132 // cookies are not stored). | 132 // cookies are not stored). |
| 133 CookieStore* cookie_store() const { return cookie_store_.get(); } | 133 CookieStore* cookie_store() const { return cookie_store_.get(); } |
| 134 void set_cookie_store(CookieStore* cookie_store); | 134 void set_cookie_store(CookieStore* cookie_store); |
| 135 | 135 |
| 136 // Gets the cookie policy for this context (may be null, in which case | 136 // Gets the cookie policy for this context (may be null, in which case |
| 137 // cookies are allowed). | 137 // cookies are allowed). |
| 138 CookiePolicy* cookie_policy() const { return cookie_policy_; } | 138 CookiePolicy* cookie_policy() const { return cookie_policy_; } |
| 139 void set_cookie_policy(CookiePolicy* cookie_policy) { | 139 void set_cookie_policy(CookiePolicy* cookie_policy) { |
| 140 cookie_policy_ = cookie_policy; | 140 cookie_policy_ = cookie_policy; |
| 141 } | 141 } |
| 142 | 142 |
| 143 TransportSecurityState* transport_security_state() const { | 143 TransportSecurityState* transport_security_state() const { |
| 144 return transport_security_state_; | 144 return transport_security_state_; |
| 145 } | 145 } |
| 146 void set_transport_security_state( | 146 void set_transport_security_state( |
| 147 net::TransportSecurityState* state) { | 147 TransportSecurityState* state) { |
| 148 transport_security_state_ = state; | 148 transport_security_state_ = state; |
| 149 } | 149 } |
| 150 | 150 |
| 151 // Gets the FTP authentication cache for this context. | 151 // Gets the FTP authentication cache for this context. |
| 152 FtpAuthCache* ftp_auth_cache() { return &ftp_auth_cache_; } | 152 FtpAuthCache* ftp_auth_cache() { return &ftp_auth_cache_; } |
| 153 | 153 |
| 154 // Gets the value of 'Accept-Charset' header field. | 154 // Gets the value of 'Accept-Charset' header field. |
| 155 const std::string& accept_charset() const { return accept_charset_; } | 155 const std::string& accept_charset() const { return accept_charset_; } |
| 156 void set_accept_charset(const std::string& accept_charset) { | 156 void set_accept_charset(const std::string& accept_charset) { |
| 157 accept_charset_ = accept_charset; | 157 accept_charset_ = accept_charset; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // Important: When adding any new members below, consider whether they need to | 223 // Important: When adding any new members below, consider whether they need to |
| 224 // be added to CopyFrom. | 224 // be added to CopyFrom. |
| 225 // --------------------------------------------------------------------------- | 225 // --------------------------------------------------------------------------- |
| 226 | 226 |
| 227 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 227 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 228 }; | 228 }; |
| 229 | 229 |
| 230 } // namespace net | 230 } // namespace net |
| 231 | 231 |
| 232 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 232 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |