OLD | NEW |
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 virtual void RequestSockets(const std::string& group_name, | 152 virtual void RequestSockets(const std::string& group_name, |
153 const void* params, | 153 const void* params, |
154 int num_sockets, | 154 int num_sockets, |
155 const BoundNetLog& net_log) OVERRIDE; | 155 const BoundNetLog& net_log) OVERRIDE; |
156 virtual void CancelRequest(const std::string& group_name, | 156 virtual void CancelRequest(const std::string& group_name, |
157 ClientSocketHandle* handle) OVERRIDE; | 157 ClientSocketHandle* handle) OVERRIDE; |
158 virtual void ReleaseSocket(const std::string& group_name, | 158 virtual void ReleaseSocket(const std::string& group_name, |
159 StreamSocket* socket, | 159 StreamSocket* socket, |
160 int id) OVERRIDE; | 160 int id) OVERRIDE; |
161 virtual void FlushWithError(int error) OVERRIDE; | 161 virtual void FlushWithError(int error) OVERRIDE; |
162 virtual bool IsStalled() const OVERRIDE; | |
163 virtual void CloseIdleSockets() OVERRIDE; | 162 virtual void CloseIdleSockets() OVERRIDE; |
164 virtual int IdleSocketCount() const OVERRIDE; | 163 virtual int IdleSocketCount() const OVERRIDE; |
165 virtual int IdleSocketCountInGroup( | 164 virtual int IdleSocketCountInGroup( |
166 const std::string& group_name) const OVERRIDE; | 165 const std::string& group_name) const OVERRIDE; |
167 virtual LoadState GetLoadState( | 166 virtual LoadState GetLoadState( |
168 const std::string& group_name, | 167 const std::string& group_name, |
169 const ClientSocketHandle* handle) const OVERRIDE; | 168 const ClientSocketHandle* handle) const OVERRIDE; |
170 virtual void AddLayeredPool(LayeredPool* layered_pool) OVERRIDE; | |
171 virtual void RemoveLayeredPool(LayeredPool* layered_pool) OVERRIDE; | |
172 virtual base::DictionaryValue* GetInfoAsValue( | 169 virtual base::DictionaryValue* GetInfoAsValue( |
173 const std::string& name, | 170 const std::string& name, |
174 const std::string& type, | 171 const std::string& type, |
175 bool include_nested_pools) const OVERRIDE; | 172 bool include_nested_pools) const OVERRIDE; |
176 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; | 173 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; |
177 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE; | 174 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE; |
178 | 175 |
| 176 // HigherLayeredPool implementation. |
| 177 virtual bool IsStalled() const OVERRIDE; |
| 178 virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) OVERRIDE; |
| 179 virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) OVERRIDE; |
| 180 |
179 private: | 181 private: |
180 typedef ClientSocketPoolBase<TransportSocketParams> PoolBase; | 182 typedef ClientSocketPoolBase<TransportSocketParams> PoolBase; |
181 | 183 |
182 class TransportConnectJobFactory | 184 class TransportConnectJobFactory |
183 : public PoolBase::ConnectJobFactory { | 185 : public PoolBase::ConnectJobFactory { |
184 public: | 186 public: |
185 TransportConnectJobFactory(ClientSocketFactory* client_socket_factory, | 187 TransportConnectJobFactory(ClientSocketFactory* client_socket_factory, |
186 HostResolver* host_resolver, | 188 HostResolver* host_resolver, |
187 NetLog* net_log) | 189 NetLog* net_log) |
188 : client_socket_factory_(client_socket_factory), | 190 : client_socket_factory_(client_socket_factory), |
(...skipping 23 matching lines...) Expand all Loading... |
212 | 214 |
213 DISALLOW_COPY_AND_ASSIGN(TransportClientSocketPool); | 215 DISALLOW_COPY_AND_ASSIGN(TransportClientSocketPool); |
214 }; | 216 }; |
215 | 217 |
216 REGISTER_SOCKET_PARAMS_FOR_POOL(TransportClientSocketPool, | 218 REGISTER_SOCKET_PARAMS_FOR_POOL(TransportClientSocketPool, |
217 TransportSocketParams); | 219 TransportSocketParams); |
218 | 220 |
219 } // namespace net | 221 } // namespace net |
220 | 222 |
221 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ | 223 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |