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

Side by Side Diff: net/http/http_network_session.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/network_change_notifier.h ('k') | net/http/http_pipelined_connection_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/http/http_network_session.h" 5 #include "net/http/http_network_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/debug/stack_trace.h" 10 #include "base/debug/stack_trace.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 Value* HttpNetworkSession::SocketPoolInfoToValue() const { 165 Value* HttpNetworkSession::SocketPoolInfoToValue() const {
166 // TODO(yutak): Should merge values from normal pools and WebSocket pools. 166 // TODO(yutak): Should merge values from normal pools and WebSocket pools.
167 return normal_socket_pool_manager_->SocketPoolInfoToValue(); 167 return normal_socket_pool_manager_->SocketPoolInfoToValue();
168 } 168 }
169 169
170 Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { 170 Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const {
171 return spdy_session_pool_.SpdySessionPoolInfoToValue(); 171 return spdy_session_pool_.SpdySessionPoolInfoToValue();
172 } 172 }
173 173
174 void HttpNetworkSession::CloseAllConnections() { 174 void HttpNetworkSession::CloseAllConnections() {
175 normal_socket_pool_manager_->FlushSocketPools(); 175 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED);
176 websocket_socket_pool_manager_->FlushSocketPools(); 176 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED);
177 spdy_session_pool_.CloseCurrentSessions(); 177 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED);
178 } 178 }
179 179
180 void HttpNetworkSession::CloseIdleConnections() { 180 void HttpNetworkSession::CloseIdleConnections() {
181 normal_socket_pool_manager_->CloseIdleSockets(); 181 normal_socket_pool_manager_->CloseIdleSockets();
182 websocket_socket_pool_manager_->CloseIdleSockets(); 182 websocket_socket_pool_manager_->CloseIdleSockets();
183 spdy_session_pool_.CloseIdleSessions(); 183 spdy_session_pool_.CloseIdleSessions();
184 } 184 }
185 185
186 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager( 186 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager(
187 SocketPoolType pool_type) { 187 SocketPoolType pool_type) {
188 switch (pool_type) { 188 switch (pool_type) {
189 case NORMAL_SOCKET_POOL: 189 case NORMAL_SOCKET_POOL:
190 return normal_socket_pool_manager_.get(); 190 return normal_socket_pool_manager_.get();
191 case WEBSOCKET_SOCKET_POOL: 191 case WEBSOCKET_SOCKET_POOL:
192 return websocket_socket_pool_manager_.get(); 192 return websocket_socket_pool_manager_.get();
193 default: 193 default:
194 NOTREACHED(); 194 NOTREACHED();
195 break; 195 break;
196 } 196 }
197 return NULL; 197 return NULL;
198 } 198 }
199 199
200 } // namespace net 200 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_change_notifier.h ('k') | net/http/http_pipelined_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698