summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authorwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-16 17:27:15 +0000
committerwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-16 17:27:15 +0000
commit822581d32a6836feae73b96a2ce494a058004423 (patch)
tree925796acd3c3aeaa357378c096c5d9efec31bf36 /chrome/browser/net
parentae89b8d559bfa6b3a2c1d404b21386bcc8995472 (diff)
downloadchromium_src-822581d32a6836feae73b96a2ce494a058004423.zip
chromium_src-822581d32a6836feae73b96a2ce494a058004423.tar.gz
chromium_src-822581d32a6836feae73b96a2ce494a058004423.tar.bz2
Cache certificate verification results in memory.
R=agl BUG=63357 TEST=none Review URL: http://codereview.chromium.org/5386001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc4
-rw-r--r--chrome/browser/net/chrome_url_request_context.h3
-rw-r--r--chrome/browser/net/connection_tester.cc7
3 files changed, 12 insertions, 2 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 0ce395d..8f0f129 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -262,6 +262,7 @@ ChromeURLRequestContext* FactoryForOriginal::Create() {
// Global host resolver for the context.
context->set_host_resolver(io_thread_globals->host_resolver.get());
+ context->set_cert_verifier(io_thread_globals->cert_verifier.get());
context->set_dnsrr_resolver(io_thread_globals->dnsrr_resolver.get());
context->set_http_auth_handler_factory(
io_thread_globals->http_auth_handler_factory.get());
@@ -284,6 +285,7 @@ ChromeURLRequestContext* FactoryForOriginal::Create() {
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
net::HttpCache* cache =
new net::HttpCache(context->host_resolver(),
+ context->cert_verifier(),
context->dnsrr_resolver(),
context->dns_cert_checker(),
context->proxy_service(),
@@ -412,6 +414,7 @@ ChromeURLRequestContext* FactoryForOffTheRecord::Create() {
net::HttpCache* cache =
new net::HttpCache(context->host_resolver(),
+ context->cert_verifier(),
context->dnsrr_resolver(),
NULL /* dns_cert_checker */,
context->proxy_service(),
@@ -505,6 +508,7 @@ ChromeURLRequestContext* FactoryForMedia::Create() {
// If original HttpCache doesn't exist, simply construct one with a whole
// new set of network stack.
cache = new net::HttpCache(main_context->host_resolver(),
+ main_context->cert_verifier(),
main_context->dnsrr_resolver(),
NULL /* dns_cert_checker */,
main_context->proxy_service(),
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index bedb9a8..4d57242 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -127,6 +127,9 @@ class ChromeURLRequestContext : public URLRequestContext {
void set_host_resolver(net::HostResolver* resolver) {
host_resolver_ = resolver;
}
+ void set_cert_verifier(net::CertVerifier* cert_verifier) {
+ cert_verifier_ = cert_verifier;
+ }
void set_dnsrr_resolver(net::DnsRRResolver* dnsrr_resolver) {
dnsrr_resolver_ = dnsrr_resolver;
}
diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc
index 7b34aea..abebac7 100644
--- a/chrome/browser/net/connection_tester.cc
+++ b/chrome/browser/net/connection_tester.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/importer/firefox_proxy_settings.h"
#include "chrome/browser/io_thread.h"
#include "chrome/common/chrome_switches.h"
+#include "net/base/cert_verifier.h"
#include "net/base/cookie_monster.h"
#include "net/base/dnsrr_resolver.h"
#include "net/base/host_resolver.h"
@@ -58,14 +59,15 @@ class ExperimentURLRequestContext : public URLRequestContext {
// The rest of the dependencies are standard, and don't depend on the
// experiment being run.
+ cert_verifier_ = new net::CertVerifier;
dnsrr_resolver_ = new net::DnsRRResolver;
ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_);
ssl_config_service_ = new net::SSLConfigServiceDefaults;
http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(
host_resolver_);
http_transaction_factory_ = new net::HttpCache(
- net::HttpNetworkLayer::CreateFactory(host_resolver_, dnsrr_resolver_,
- NULL /* dns_cert_checker */,
+ net::HttpNetworkLayer::CreateFactory(host_resolver_, cert_verifier_,
+ dnsrr_resolver_, NULL /* dns_cert_checker */,
NULL /* ssl_host_info_factory */, proxy_service_,
ssl_config_service_, http_auth_handler_factory_, NULL, NULL),
net::HttpCache::DefaultBackend::InMemory(0));
@@ -81,6 +83,7 @@ class ExperimentURLRequestContext : public URLRequestContext {
delete http_transaction_factory_;
delete http_auth_handler_factory_;
delete dnsrr_resolver_;
+ delete cert_verifier_;
delete host_resolver_;
}