diff options
Diffstat (limited to 'net/url_request/url_request_context.h')
-rw-r--r-- | net/url_request/url_request_context.h | 84 |
1 files changed, 44 insertions, 40 deletions
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index 517148e..b54faf4 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -33,9 +33,8 @@ class HttpNetworkDelegate; class HttpTransactionFactory; class SSLConfigService; class URLRequest; -} // namespace net -// Subclass to provide application-specific context for net::URLRequest +// Subclass to provide application-specific context for URLRequest // instances. class URLRequestContext : public base::RefCountedThreadSafe<URLRequestContext>, @@ -43,94 +42,94 @@ class URLRequestContext public: URLRequestContext(); - net::NetLog* net_log() const { + NetLog* net_log() const { return net_log_; } - void set_net_log(net::NetLog* net_log) { + void set_net_log(NetLog* net_log) { net_log_ = net_log; } - net::HostResolver* host_resolver() const { + HostResolver* host_resolver() const { return host_resolver_; } - void set_host_resolver(net::HostResolver* host_resolver) { + void set_host_resolver(HostResolver* host_resolver) { host_resolver_ = host_resolver; } - net::CertVerifier* cert_verifier() const { + CertVerifier* cert_verifier() const { return cert_verifier_; } - void set_cert_verifier(net::CertVerifier* cert_verifier) { + void set_cert_verifier(CertVerifier* cert_verifier) { cert_verifier_ = cert_verifier; } - net::DnsRRResolver* dnsrr_resolver() const { + DnsRRResolver* dnsrr_resolver() const { return dnsrr_resolver_; } - void set_dnsrr_resolver(net::DnsRRResolver* dnsrr_resolver) { + void set_dnsrr_resolver(DnsRRResolver* dnsrr_resolver) { dnsrr_resolver_ = dnsrr_resolver; } - net::DnsCertProvenanceChecker* dns_cert_checker() const { + DnsCertProvenanceChecker* dns_cert_checker() const { return dns_cert_checker_.get(); } // Get the proxy service for this context. - net::ProxyService* proxy_service() const { + ProxyService* proxy_service() const { return proxy_service_; } - void set_proxy_service(net::ProxyService* proxy_service) { + void set_proxy_service(ProxyService* proxy_service) { proxy_service_ = proxy_service; } // Get the ssl config service for this context. - net::SSLConfigService* ssl_config_service() const { + SSLConfigService* ssl_config_service() const { return ssl_config_service_; } // Gets the HTTP Authentication Handler Factory for this context. // The factory is only valid for the lifetime of this URLRequestContext - net::HttpAuthHandlerFactory* http_auth_handler_factory() { + HttpAuthHandlerFactory* http_auth_handler_factory() { return http_auth_handler_factory_; } - void set_http_auth_handler_factory(net::HttpAuthHandlerFactory* factory) { + void set_http_auth_handler_factory(HttpAuthHandlerFactory* factory) { http_auth_handler_factory_ = factory; } // Gets the http transaction factory for this context. - net::HttpTransactionFactory* http_transaction_factory() const { + HttpTransactionFactory* http_transaction_factory() const { return http_transaction_factory_; } - void set_http_transaction_factory(net::HttpTransactionFactory* factory) { + void set_http_transaction_factory(HttpTransactionFactory* factory) { http_transaction_factory_ = factory; } // Gets the ftp transaction factory for this context. - net::FtpTransactionFactory* ftp_transaction_factory() { + FtpTransactionFactory* ftp_transaction_factory() { return ftp_transaction_factory_; } // Gets the cookie store for this context (may be null, in which case // cookies are not stored). - net::CookieStore* cookie_store() { return cookie_store_.get(); } + CookieStore* cookie_store() { return cookie_store_.get(); } - void set_cookie_store(net::CookieStore* cookie_store); + void set_cookie_store(CookieStore* cookie_store); // Gets the cookie policy for this context (may be null, in which case // cookies are allowed). - net::CookiePolicy* cookie_policy() { return cookie_policy_; } + CookiePolicy* cookie_policy() { return cookie_policy_; } - net::TransportSecurityState* transport_security_state() { + TransportSecurityState* transport_security_state() { return transport_security_state_; } // Gets the FTP authentication cache for this context. - net::FtpAuthCache* ftp_auth_cache() { return &ftp_auth_cache_; } + FtpAuthCache* ftp_auth_cache() { return &ftp_auth_cache_; } // Gets the value of 'Accept-Charset' header field. const std::string& accept_charset() const { return accept_charset_; } @@ -162,21 +161,21 @@ class URLRequestContext // The following members are expected to be initialized and owned by // subclasses. - net::NetLog* net_log_; - net::HostResolver* host_resolver_; - net::CertVerifier* cert_verifier_; - net::DnsRRResolver* dnsrr_resolver_; - scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; - scoped_refptr<net::ProxyService> proxy_service_; - scoped_refptr<net::SSLConfigService> ssl_config_service_; - net::HttpTransactionFactory* http_transaction_factory_; - net::FtpTransactionFactory* ftp_transaction_factory_; - net::HttpAuthHandlerFactory* http_auth_handler_factory_; - net::HttpNetworkDelegate* network_delegate_; - scoped_refptr<net::CookieStore> cookie_store_; - net::CookiePolicy* cookie_policy_; - scoped_refptr<net::TransportSecurityState> transport_security_state_; - net::FtpAuthCache ftp_auth_cache_; + NetLog* net_log_; + HostResolver* host_resolver_; + CertVerifier* cert_verifier_; + DnsRRResolver* dnsrr_resolver_; + scoped_ptr<DnsCertProvenanceChecker> dns_cert_checker_; + scoped_refptr<ProxyService> proxy_service_; + scoped_refptr<SSLConfigService> ssl_config_service_; + HttpTransactionFactory* http_transaction_factory_; + FtpTransactionFactory* ftp_transaction_factory_; + HttpAuthHandlerFactory* http_auth_handler_factory_; + HttpNetworkDelegate* network_delegate_; + scoped_refptr<CookieStore> cookie_store_; + CookiePolicy* cookie_policy_; + scoped_refptr<TransportSecurityState> transport_security_state_; + FtpAuthCache ftp_auth_cache_; std::string accept_language_; std::string accept_charset_; // The charset of the referrer where this request comes from. It's not @@ -191,4 +190,9 @@ class URLRequestContext DISALLOW_COPY_AND_ASSIGN(URLRequestContext); }; +} // namespace net + +// TODO(tfarina): Fix the callers and remove this! +typedef net::URLRequestContext URLRequestContext; + #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |