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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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_ |
OLD | NEW |