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

Side by Side Diff: net/socket/client_socket_pool.h

Issue 2678353003: Close idle H2 sockets when SpdySession is initialized. (Closed)
Patch Set: Address comments to hook directly to ClientSocketHandle Created 3 years, 9 months 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
« no previous file with comments | « net/socket/client_socket_handle.cc ('k') | net/socket/client_socket_pool_base.h » ('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 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_H_ 5 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_H_
6 #define NET_SOCKET_CLIENT_SOCKET_POOL_H_ 6 #define NET_SOCKET_CLIENT_SOCKET_POOL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // This flushes all state from the ClientSocketPool. This means that all 156 // This flushes all state from the ClientSocketPool. This means that all
157 // idle and connecting sockets are discarded with the given |error|. 157 // idle and connecting sockets are discarded with the given |error|.
158 // Active sockets being held by ClientSocketPool clients will be discarded 158 // Active sockets being held by ClientSocketPool clients will be discarded
159 // when released back to the pool. 159 // when released back to the pool.
160 // Does not flush any pools wrapped by |this|. 160 // Does not flush any pools wrapped by |this|.
161 virtual void FlushWithError(int error) = 0; 161 virtual void FlushWithError(int error) = 0;
162 162
163 // Called to close any idle connections held by the connection manager. 163 // Called to close any idle connections held by the connection manager.
164 virtual void CloseIdleSockets() = 0; 164 virtual void CloseIdleSockets() = 0;
165 165
166 // Called to close any idle connections held by the connection manager.
167 virtual void CloseIdleSocketsInGroup(const std::string& group_name) = 0;
168
166 // The total number of idle sockets in the pool. 169 // The total number of idle sockets in the pool.
167 virtual int IdleSocketCount() const = 0; 170 virtual int IdleSocketCount() const = 0;
168 171
169 // The total number of idle sockets in a connection group. 172 // The total number of idle sockets in a connection group.
170 virtual int IdleSocketCountInGroup(const std::string& group_name) const = 0; 173 virtual int IdleSocketCountInGroup(const std::string& group_name) const = 0;
171 174
172 // Determine the LoadState of a connecting ClientSocketHandle. 175 // Determine the LoadState of a connecting ClientSocketHandle.
173 virtual LoadState GetLoadState(const std::string& group_name, 176 virtual LoadState GetLoadState(const std::string& group_name,
174 const ClientSocketHandle* handle) const = 0; 177 const ClientSocketHandle* handle) const = 0;
175 178
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 const std::string& group_name, 211 const std::string& group_name,
209 const scoped_refptr<typename PoolType::SocketParams>& params, 212 const scoped_refptr<typename PoolType::SocketParams>& params,
210 int num_sockets, 213 int num_sockets,
211 const NetLogWithSource& net_log) { 214 const NetLogWithSource& net_log) {
212 pool->RequestSockets(group_name, &params, num_sockets, net_log); 215 pool->RequestSockets(group_name, &params, num_sockets, net_log);
213 } 216 }
214 217
215 } // namespace net 218 } // namespace net
216 219
217 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_H_ 220 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_H_
OLDNEW
« no previous file with comments | « net/socket/client_socket_handle.cc ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698