Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1017)

Unified Diff: net/socket/client_socket_pool_manager_impl.cc

Issue 11464028: Introduce ERR_NETWORK_CHANGED and allow URLFetcher to automatically retry on that error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed nits Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/client_socket_pool_manager_impl.h ('k') | net/socket/mock_client_socket_pool_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_manager_impl.cc
diff --git a/net/socket/client_socket_pool_manager_impl.cc b/net/socket/client_socket_pool_manager_impl.cc
index a91bca9cddc79f7a62b3e58c273de6c99b30137c..bd4665209a6b3643459c1a6c28a90375defc4e83 100644
--- a/net/socket/client_socket_pool_manager_impl.cc
+++ b/net/socket/client_socket_pool_manager_impl.cc
@@ -90,7 +90,7 @@ ClientSocketPoolManagerImpl::~ClientSocketPoolManagerImpl() {
CertDatabase::GetInstance()->RemoveObserver(this);
}
-void ClientSocketPoolManagerImpl::FlushSocketPools() {
+void ClientSocketPoolManagerImpl::FlushSocketPoolsWithError(int error) {
// Flush the highest level pools first, since higher level pools may release
// stuff to the lower level pools.
@@ -98,46 +98,46 @@ void ClientSocketPoolManagerImpl::FlushSocketPools() {
ssl_socket_pools_for_proxies_.begin();
it != ssl_socket_pools_for_proxies_.end();
++it)
- it->second->Flush();
+ it->second->FlushWithError(error);
for (HTTPProxySocketPoolMap::const_iterator it =
http_proxy_socket_pools_.begin();
it != http_proxy_socket_pools_.end();
++it)
- it->second->Flush();
+ it->second->FlushWithError(error);
for (SSLSocketPoolMap::const_iterator it =
ssl_socket_pools_for_https_proxies_.begin();
it != ssl_socket_pools_for_https_proxies_.end();
++it)
- it->second->Flush();
+ it->second->FlushWithError(error);
for (TransportSocketPoolMap::const_iterator it =
transport_socket_pools_for_https_proxies_.begin();
it != transport_socket_pools_for_https_proxies_.end();
++it)
- it->second->Flush();
+ it->second->FlushWithError(error);
for (TransportSocketPoolMap::const_iterator it =
transport_socket_pools_for_http_proxies_.begin();
it != transport_socket_pools_for_http_proxies_.end();
++it)
- it->second->Flush();
+ it->second->FlushWithError(error);
for (SOCKSSocketPoolMap::const_iterator it =
socks_socket_pools_.begin();
it != socks_socket_pools_.end();
++it)
- it->second->Flush();
+ it->second->FlushWithError(error);
for (TransportSocketPoolMap::const_iterator it =
transport_socket_pools_for_socks_proxies_.begin();
it != transport_socket_pools_for_socks_proxies_.end();
++it)
- it->second->Flush();
+ it->second->FlushWithError(error);
- ssl_socket_pool_->Flush();
- transport_socket_pool_->Flush();
+ ssl_socket_pool_->FlushWithError(error);
+ transport_socket_pool_->FlushWithError(error);
}
void ClientSocketPoolManagerImpl::CloseIdleSockets() {
@@ -372,7 +372,7 @@ Value* ClientSocketPoolManagerImpl::SocketPoolInfoToValue() const {
}
void ClientSocketPoolManagerImpl::OnCertAdded(const X509Certificate* cert) {
- FlushSocketPools();
+ FlushSocketPoolsWithError(ERR_NETWORK_CHANGED);
}
void ClientSocketPoolManagerImpl::OnCertTrustChanged(
@@ -387,7 +387,7 @@ void ClientSocketPoolManagerImpl::OnCertTrustChanged(
// 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();
+ FlushSocketPoolsWithError(ERR_NETWORK_CHANGED);
}
} // namespace net
« no previous file with comments | « net/socket/client_socket_pool_manager_impl.h ('k') | net/socket/mock_client_socket_pool_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698