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

Unified Diff: net/spdy/spdy_session_pool.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/spdy/spdy_session_pool.h ('k') | net/spdy/spdy_session_spdy2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_pool.cc
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index a9279d268881cfb5b335a5e23789bc15230a73d9..b967a463caa3fde9a1e28c7e84f1fbafe7a23f82 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -275,12 +275,12 @@ Value* SpdySessionPool::SpdySessionPoolInfoToValue() const {
}
void SpdySessionPool::OnIPAddressChanged() {
- CloseCurrentSessions();
+ CloseCurrentSessions(ERR_NETWORK_CHANGED);
http_server_properties_->ClearSpdySettings();
}
void SpdySessionPool::OnSSLConfigChanged() {
- CloseCurrentSessions();
+ CloseCurrentSessions(ERR_NETWORK_CHANGED);
}
scoped_refptr<SpdySession> SpdySessionPool::GetExistingSession(
@@ -347,7 +347,7 @@ scoped_refptr<SpdySession> SpdySessionPool::GetFromAlias(
}
void SpdySessionPool::OnCertAdded(const X509Certificate* cert) {
- CloseCurrentSessions();
+ CloseCurrentSessions(ERR_NETWORK_CHANGED);
}
void SpdySessionPool::OnCertTrustChanged(const X509Certificate* cert) {
@@ -355,7 +355,7 @@ void SpdySessionPool::OnCertTrustChanged(const X509Certificate* cert) {
// reduced. CloseCurrentSessions now because OnCertTrustChanged does not
// tell us this.
// See comments in ClientSocketPoolManager::OnCertTrustChanged.
- CloseCurrentSessions();
+ CloseCurrentSessions(ERR_NETWORK_CHANGED);
}
const HostPortProxyPair& SpdySessionPool::NormalizeListPair(
@@ -447,7 +447,7 @@ void SpdySessionPool::CloseAllSessions() {
}
}
-void SpdySessionPool::CloseCurrentSessions() {
+void SpdySessionPool::CloseCurrentSessions(net::Error error) {
SpdySessionsMap old_map;
old_map.swap(sessions_);
for (SpdySessionsMap::const_iterator it = old_map.begin();
@@ -464,8 +464,7 @@ void SpdySessionPool::CloseCurrentSessions() {
CHECK(list);
const scoped_refptr<SpdySession>& session = list->front();
CHECK(session);
- session->CloseSessionOnError(
- net::ERR_ABORTED, false, "Closing current sessions.");
+ session->CloseSessionOnError(error, false, "Closing current sessions.");
list->pop_front();
if (list->empty()) {
delete list;
« no previous file with comments | « net/spdy/spdy_session_pool.h ('k') | net/spdy/spdy_session_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698