OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 virtual ~TransportClientSocketPool(); | 145 virtual ~TransportClientSocketPool(); |
146 | 146 |
147 // ClientSocketPool methods: | 147 // ClientSocketPool methods: |
148 | 148 |
149 virtual int RequestSocket(const std::string& group_name, | 149 virtual int RequestSocket(const std::string& group_name, |
150 const void* resolve_info, | 150 const void* resolve_info, |
151 RequestPriority priority, | 151 RequestPriority priority, |
152 ClientSocketHandle* handle, | 152 ClientSocketHandle* handle, |
153 OldCompletionCallback* callback, | 153 OldCompletionCallback* callback, |
154 const BoundNetLog& net_log); | 154 const BoundNetLog& net_log) OVERRIDE; |
155 | 155 |
156 virtual void RequestSockets(const std::string& group_name, | 156 virtual void RequestSockets(const std::string& group_name, |
157 const void* params, | 157 const void* params, |
158 int num_sockets, | 158 int num_sockets, |
159 const BoundNetLog& net_log); | 159 const BoundNetLog& net_log) OVERRIDE; |
160 | 160 |
161 virtual void CancelRequest(const std::string& group_name, | 161 virtual void CancelRequest(const std::string& group_name, |
162 ClientSocketHandle* handle); | 162 ClientSocketHandle* handle) OVERRIDE; |
163 | 163 |
164 virtual void ReleaseSocket(const std::string& group_name, | 164 virtual void ReleaseSocket(const std::string& group_name, |
165 StreamSocket* socket, | 165 StreamSocket* socket, |
166 int id); | 166 int id) OVERRIDE; |
167 | 167 |
168 virtual void Flush(); | 168 virtual void Flush() OVERRIDE; |
169 | 169 |
170 virtual void CloseIdleSockets(); | 170 virtual bool IsStalled() const OVERRIDE; |
171 | 171 |
172 virtual int IdleSocketCount() const; | 172 virtual void CloseIdleSockets() OVERRIDE; |
173 | 173 |
174 virtual int IdleSocketCountInGroup(const std::string& group_name) const; | 174 virtual int IdleSocketCount() const OVERRIDE; |
175 | 175 |
176 virtual LoadState GetLoadState(const std::string& group_name, | 176 virtual int IdleSocketCountInGroup( |
177 const ClientSocketHandle* handle) const; | 177 const std::string& group_name) const OVERRIDE; |
| 178 |
| 179 virtual LoadState GetLoadState( |
| 180 const std::string& group_name, |
| 181 const ClientSocketHandle* handle) const OVERRIDE; |
| 182 |
| 183 virtual void AddLayeredPool(LayeredPool* layered_pool) OVERRIDE; |
| 184 |
| 185 virtual void RemoveLayeredPool(LayeredPool* layered_pool) OVERRIDE; |
178 | 186 |
179 virtual base::DictionaryValue* GetInfoAsValue( | 187 virtual base::DictionaryValue* GetInfoAsValue( |
180 const std::string& name, | 188 const std::string& name, |
181 const std::string& type, | 189 const std::string& type, |
182 bool include_nested_pools) const; | 190 bool include_nested_pools) const OVERRIDE; |
183 | 191 |
184 virtual base::TimeDelta ConnectionTimeout() const; | 192 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; |
185 | 193 |
186 virtual ClientSocketPoolHistograms* histograms() const; | 194 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE; |
187 | 195 |
188 private: | 196 private: |
189 typedef ClientSocketPoolBase<TransportSocketParams> PoolBase; | 197 typedef ClientSocketPoolBase<TransportSocketParams> PoolBase; |
190 | 198 |
191 class TransportConnectJobFactory | 199 class TransportConnectJobFactory |
192 : public PoolBase::ConnectJobFactory { | 200 : public PoolBase::ConnectJobFactory { |
193 public: | 201 public: |
194 TransportConnectJobFactory(ClientSocketFactory* client_socket_factory, | 202 TransportConnectJobFactory(ClientSocketFactory* client_socket_factory, |
195 HostResolver* host_resolver, | 203 HostResolver* host_resolver, |
196 NetLog* net_log) | 204 NetLog* net_log) |
(...skipping 24 matching lines...) Expand all Loading... |
221 | 229 |
222 DISALLOW_COPY_AND_ASSIGN(TransportClientSocketPool); | 230 DISALLOW_COPY_AND_ASSIGN(TransportClientSocketPool); |
223 }; | 231 }; |
224 | 232 |
225 REGISTER_SOCKET_PARAMS_FOR_POOL(TransportClientSocketPool, | 233 REGISTER_SOCKET_PARAMS_FOR_POOL(TransportClientSocketPool, |
226 TransportSocketParams); | 234 TransportSocketParams); |
227 | 235 |
228 } // namespace net | 236 } // namespace net |
229 | 237 |
230 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ | 238 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |