summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session_pool.cc
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-10 04:16:25 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-10 04:16:25 +0000
commit62635c758fce2b22a1cf5acdc57579bb5801b2e3 (patch)
tree4085d65bbf01078b722cbcef5930e157d7f793be /net/spdy/spdy_session_pool.cc
parentd7f6e73fb05992d784e55df2a1ed25924b5d79f3 (diff)
downloadchromium_src-62635c758fce2b22a1cf5acdc57579bb5801b2e3.zip
chromium_src-62635c758fce2b22a1cf5acdc57579bb5801b2e3.tar.gz
chromium_src-62635c758fce2b22a1cf5acdc57579bb5801b2e3.tar.bz2
Define a new CertDatabase::Observer abstract class which can be implemented by classes which wish to be notified when a new ssl client cert is added.
Register SpdySessionPool, SocketPoolManager and SSLClientAuthCache as observers. Notify observers in CertDatabase::AddUserCert(); BUG=75326 Review URL: http://codereview.chromium.org/6588014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session_pool.cc')
-rw-r--r--net/spdy/spdy_session_pool.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index e2cae2b..0220d11 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -22,6 +22,7 @@ SpdySessionPool::SpdySessionPool(SSLConfigService* ssl_config_service)
NetworkChangeNotifier::AddIPAddressObserver(this);
if (ssl_config_service_)
ssl_config_service_->AddObserver(this);
+ CertDatabase::AddObserver(this);
}
SpdySessionPool::~SpdySessionPool() {
@@ -30,6 +31,7 @@ SpdySessionPool::~SpdySessionPool() {
if (ssl_config_service_)
ssl_config_service_->RemoveObserver(this);
NetworkChangeNotifier::RemoveIPAddressObserver(this);
+ CertDatabase::RemoveObserver(this);
}
scoped_refptr<SpdySession> SpdySessionPool::Get(
@@ -136,6 +138,10 @@ void SpdySessionPool::OnSSLConfigChanged() {
CloseCurrentSessions();
}
+void SpdySessionPool::OnUserCertAdded(X509Certificate* cert) {
+ CloseCurrentSessions();
+}
+
const HostPortProxyPair& SpdySessionPool::NormalizeListPair(
const HostPortProxyPair& host_port_proxy_pair) const {
if (!g_force_single_domain)