summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 13:33:21 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 13:33:21 +0000
commit7ab5bbd128a32d32046201df76b86d370efa65af (patch)
tree69a234c16498a3a27acacc2c4681f783c4bd0975 /net/http/http_cache.cc
parent0a0d806aa4c534ff999f6bac2503d76d1d38e38d (diff)
downloadchromium_src-7ab5bbd128a32d32046201df76b86d370efa65af.zip
chromium_src-7ab5bbd128a32d32046201df76b86d370efa65af.tar.gz
chromium_src-7ab5bbd128a32d32046201df76b86d370efa65af.tar.bz2
Revert revert 62918 - net: clean up SSLHostInfo construction."
Was reverted in r62922 due to a change landing between the try run and the commit. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63046 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r--net/http/http_cache.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index a62c84e..153b5d5 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -24,7 +24,9 @@
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
+#include "net/base/ssl_host_info.h"
#include "net/disk_cache/disk_cache.h"
+#include "net/http/disk_cache_based_ssl_host_info.h"
#include "net/http/http_cache_transaction.h"
#include "net/http/http_network_layer.h"
#include "net/http/http_network_session.h"
@@ -259,6 +261,22 @@ void HttpCache::MetadataWriter::OnIOComplete(int result) {
//-----------------------------------------------------------------------------
+class HttpCache::SSLHostInfoFactoryAdaptor : public SSLHostInfoFactory {
+ public:
+ SSLHostInfoFactoryAdaptor(HttpCache* http_cache)
+ : http_cache_(http_cache) {
+ }
+
+ SSLHostInfo* GetForHost(const std::string& hostname) {
+ return new DiskCacheBasedSSLHostInfo(hostname, http_cache_);
+ }
+
+ private:
+ HttpCache* const http_cache_;
+};
+
+//-----------------------------------------------------------------------------
+
HttpCache::HttpCache(HostResolver* host_resolver,
DnsRRResolver* dnsrr_resolver,
ProxyService* proxy_service,
@@ -270,8 +288,11 @@ HttpCache::HttpCache(HostResolver* host_resolver,
: backend_factory_(backend_factory),
building_backend_(false),
mode_(NORMAL),
+ ssl_host_info_factory_(new SSLHostInfoFactoryAdaptor(
+ ALLOW_THIS_IN_INITIALIZER_LIST(this))),
network_layer_(HttpNetworkLayer::CreateFactory(host_resolver,
- dnsrr_resolver, proxy_service, ssl_config_service,
+ dnsrr_resolver, ssl_host_info_factory_.get(),
+ proxy_service, ssl_config_service,
http_auth_handler_factory, network_delegate, net_log)),
ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)),
enable_range_support_(true) {