summaryrefslogtreecommitdiffstats
path: root/net/socket/client_socket_pool_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket/client_socket_pool_manager.cc')
-rw-r--r--net/socket/client_socket_pool_manager.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
index d9a2225..de29bd5 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -580,7 +580,21 @@ Value* ClientSocketPoolManager::SocketPoolInfoToValue() const {
return list;
}
-void ClientSocketPoolManager::OnUserCertAdded(X509Certificate* cert) {
+void ClientSocketPoolManager::OnUserCertAdded(const X509Certificate* cert) {
+ FlushSocketPools();
+}
+
+void ClientSocketPoolManager::OnCertTrustChanged(const X509Certificate* cert) {
+ // We should flush the socket pools if we removed trust from a
+ // cert, because a previously trusted server may have become
+ // untrusted.
+ //
+ // We should not flush the socket pools if we added trust to a
+ // cert.
+ //
+ // Since the OnCertTrustChanged method doesn't tell us what
+ // kind of trust change it is, we have to flush the socket
+ // pools to be safe.
FlushSocketPools();
}