diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-19 21:48:42 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-19 21:48:42 +0000 |
commit | db36938cb26cf265a5fd93690a8e783d01406958 (patch) | |
tree | 7261d389592cdfbbb3063f223455518db12d3bda /net/url_request | |
parent | 0d1872ebba9b790f3a33bcaecc11258ea924b397 (diff) | |
download | chromium_src-db36938cb26cf265a5fd93690a8e783d01406958.zip chromium_src-db36938cb26cf265a5fd93690a8e783d01406958.tar.gz chromium_src-db36938cb26cf265a5fd93690a8e783d01406958.tar.bz2 |
Pref-backed SSLConfigService for Linux.
Makes SSLConfigService into a ref-counted interface, and makes Profile own an SSLConfigServiceFactory which is used to create the SSLConfigService and pass it through the URLRequestContext on down to where it is actually used.
R=eroman,wtc
BUG=11507,19290
Review URL: http://codereview.chromium.org/165003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request_context.h | 7 | ||||
-rw-r--r-- | net/url_request/url_request_unittest.cc | 4 | ||||
-rw-r--r-- | net/url_request/url_request_unittest.h | 7 |
3 files changed, 15 insertions, 3 deletions
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index aac651a..72b02ec 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h @@ -15,6 +15,7 @@ #include "net/base/cookie_policy.h" #include "net/base/cookie_store.h" #include "net/base/host_resolver.h" +#include "net/base/ssl_config_service.h" #include "net/ftp/ftp_auth_cache.h" #include "net/proxy/proxy_service.h" @@ -45,6 +46,11 @@ class URLRequestContext : return proxy_service_; } + // Get the ssl config service for this context. + net::SSLConfigService* ssl_config_service() const { + return ssl_config_service_; + } + // Gets the http transaction factory for this context. net::HttpTransactionFactory* http_transaction_factory() { return http_transaction_factory_; @@ -108,6 +114,7 @@ class URLRequestContext : // subclasses. scoped_refptr<net::HostResolver> host_resolver_; scoped_refptr<net::ProxyService> proxy_service_; + scoped_refptr<net::SSLConfigService> ssl_config_service_; net::HttpTransactionFactory* http_transaction_factory_; net::FtpTransactionFactory* ftp_transaction_factory_; net::CookieStore* cookie_store_; diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc index 93c29f2..d68175b 100644 --- a/net/url_request/url_request_unittest.cc +++ b/net/url_request/url_request_unittest.cc @@ -50,9 +50,11 @@ class URLRequestTestContext : public URLRequestContext { host_resolver_ = net::CreateSystemHostResolver(); proxy_service_ = net::ProxyService::CreateNull(); ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); + ssl_config_service_ = new net::SSLConfigServiceDefaults; http_transaction_factory_ = new net::HttpCache( - net::HttpNetworkLayer::CreateFactory(host_resolver_, proxy_service_), + net::HttpNetworkLayer::CreateFactory(host_resolver_, proxy_service_, + ssl_config_service_), disk_cache::CreateInMemoryCacheBackend(0)); // In-memory cookie store. cookie_store_ = new net::CookieMonster(); diff --git a/net/url_request/url_request_unittest.h b/net/url_request/url_request_unittest.h index 22e9b99..e058957 100644 --- a/net/url_request/url_request_unittest.h +++ b/net/url_request/url_request_unittest.h @@ -24,6 +24,7 @@ #include "net/base/host_resolver.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" +#include "net/base/ssl_config_service_defaults.h" #include "net/http/http_network_layer.h" #include "net/socket/ssl_test_util.h" #include "net/url_request/url_request.h" @@ -45,9 +46,10 @@ class TestURLRequestContext : public URLRequestContext { TestURLRequestContext() { host_resolver_ = net::CreateSystemHostResolver(); proxy_service_ = net::ProxyService::CreateNull(); + ssl_config_service_ = new net::SSLConfigServiceDefaults; http_transaction_factory_ = net::HttpNetworkLayer::CreateFactory(host_resolver_, - proxy_service_); + proxy_service_, ssl_config_service_); } explicit TestURLRequestContext(const std::string& proxy) { @@ -55,9 +57,10 @@ class TestURLRequestContext : public URLRequestContext { net::ProxyConfig proxy_config; proxy_config.proxy_rules.ParseFromString(proxy); proxy_service_ = net::ProxyService::CreateFixed(proxy_config); + ssl_config_service_ = new net::SSLConfigServiceDefaults; http_transaction_factory_ = net::HttpNetworkLayer::CreateFactory(host_resolver_, - proxy_service_); + proxy_service_, ssl_config_service_); } virtual ~TestURLRequestContext() { |