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

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

Issue 18796003: When an idle socket is added back to a socket pool, check for stalled jobs in lower pools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update comments Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_pool.cc ('k') | net/socket/transport_client_socket_pool.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 #ifndef NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ 5 #ifndef NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_
6 #define NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ 6 #define NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 virtual void RequestSockets(const std::string& group_name, 154 virtual void RequestSockets(const std::string& group_name,
155 const void* params, 155 const void* params,
156 int num_sockets, 156 int num_sockets,
157 const BoundNetLog& net_log) OVERRIDE; 157 const BoundNetLog& net_log) OVERRIDE;
158 virtual void CancelRequest(const std::string& group_name, 158 virtual void CancelRequest(const std::string& group_name,
159 ClientSocketHandle* handle) OVERRIDE; 159 ClientSocketHandle* handle) OVERRIDE;
160 virtual void ReleaseSocket(const std::string& group_name, 160 virtual void ReleaseSocket(const std::string& group_name,
161 scoped_ptr<StreamSocket> socket, 161 scoped_ptr<StreamSocket> socket,
162 int id) OVERRIDE; 162 int id) OVERRIDE;
163 virtual void FlushWithError(int error) OVERRIDE; 163 virtual void FlushWithError(int error) OVERRIDE;
164 virtual bool IsStalled() const OVERRIDE;
165 virtual void CloseIdleSockets() OVERRIDE; 164 virtual void CloseIdleSockets() OVERRIDE;
166 virtual int IdleSocketCount() const OVERRIDE; 165 virtual int IdleSocketCount() const OVERRIDE;
167 virtual int IdleSocketCountInGroup( 166 virtual int IdleSocketCountInGroup(
168 const std::string& group_name) const OVERRIDE; 167 const std::string& group_name) const OVERRIDE;
169 virtual LoadState GetLoadState( 168 virtual LoadState GetLoadState(
170 const std::string& group_name, 169 const std::string& group_name,
171 const ClientSocketHandle* handle) const OVERRIDE; 170 const ClientSocketHandle* handle) const OVERRIDE;
172 virtual void AddLayeredPool(LayeredPool* layered_pool) OVERRIDE;
173 virtual void RemoveLayeredPool(LayeredPool* layered_pool) OVERRIDE;
174 virtual base::DictionaryValue* GetInfoAsValue( 171 virtual base::DictionaryValue* GetInfoAsValue(
175 const std::string& name, 172 const std::string& name,
176 const std::string& type, 173 const std::string& type,
177 bool include_nested_pools) const OVERRIDE; 174 bool include_nested_pools) const OVERRIDE;
178 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; 175 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE;
179 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE; 176 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE;
180 177
178 // HigherLayeredPool implementation.
179 virtual bool IsStalled() const OVERRIDE;
180 virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) OVERRIDE;
181 virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) OVERRIDE;
182
181 private: 183 private:
182 typedef ClientSocketPoolBase<TransportSocketParams> PoolBase; 184 typedef ClientSocketPoolBase<TransportSocketParams> PoolBase;
183 185
184 class TransportConnectJobFactory 186 class TransportConnectJobFactory
185 : public PoolBase::ConnectJobFactory { 187 : public PoolBase::ConnectJobFactory {
186 public: 188 public:
187 TransportConnectJobFactory(ClientSocketFactory* client_socket_factory, 189 TransportConnectJobFactory(ClientSocketFactory* client_socket_factory,
188 HostResolver* host_resolver, 190 HostResolver* host_resolver,
189 NetLog* net_log) 191 NetLog* net_log)
190 : client_socket_factory_(client_socket_factory), 192 : client_socket_factory_(client_socket_factory),
(...skipping 20 matching lines...) Expand all
211 }; 213 };
212 214
213 PoolBase base_; 215 PoolBase base_;
214 216
215 DISALLOW_COPY_AND_ASSIGN(TransportClientSocketPool); 217 DISALLOW_COPY_AND_ASSIGN(TransportClientSocketPool);
216 }; 218 };
217 219
218 } // namespace net 220 } // namespace net
219 221
220 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ 222 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool.cc ('k') | net/socket/transport_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698