OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/socket/client_socket_pool_manager_impl.h" | 5 #include "net/socket/client_socket_pool_manager_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 AddSocketPoolsToList(list.get(), socks_socket_pools_, "socks_socket_pool", | 349 AddSocketPoolsToList(list.get(), socks_socket_pools_, "socks_socket_pool", |
350 true); | 350 true); |
351 | 351 |
352 // Third parameter is false because |ssl_socket_pools_for_proxies_| use | 352 // Third parameter is false because |ssl_socket_pools_for_proxies_| use |
353 // socket pools in |http_proxy_socket_pools_| and |socks_socket_pools_|. | 353 // socket pools in |http_proxy_socket_pools_| and |socks_socket_pools_|. |
354 AddSocketPoolsToList(list.get(), ssl_socket_pools_for_proxies_, | 354 AddSocketPoolsToList(list.get(), ssl_socket_pools_for_proxies_, |
355 "ssl_socket_pool_for_proxies", false); | 355 "ssl_socket_pool_for_proxies", false); |
356 return std::move(list); | 356 return std::move(list); |
357 } | 357 } |
358 | 358 |
359 void ClientSocketPoolManagerImpl::OnCertAdded(const X509Certificate* cert) { | 359 void ClientSocketPoolManagerImpl::OnCertDBChanged(const X509Certificate* cert) { |
360 FlushSocketPoolsWithError(ERR_NETWORK_CHANGED); | 360 FlushSocketPoolsWithError(ERR_NETWORK_CHANGED); |
361 } | 361 } |
362 | 362 |
363 void ClientSocketPoolManagerImpl::OnCACertChanged( | |
364 const X509Certificate* cert) { | |
365 // We should flush the socket pools if we removed trust from a | |
366 // cert, because a previously trusted server may have become | |
367 // untrusted. | |
368 // | |
369 // We should not flush the socket pools if we added trust to a | |
370 // cert. | |
371 // | |
372 // Since the OnCACertChanged method doesn't tell us what | |
373 // kind of change it is, we have to flush the socket | |
374 // pools to be safe. | |
375 FlushSocketPoolsWithError(ERR_NETWORK_CHANGED); | |
376 } | |
377 | |
378 } // namespace net | 363 } // namespace net |
OLD | NEW |