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_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> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "net/base/completion_callback.h" | 15 #include "net/base/completion_callback.h" |
16 #include "net/base/load_states.h" | 16 #include "net/base/load_states.h" |
17 #include "net/base/net_export.h" | 17 #include "net/base/net_export.h" |
18 #include "net/base/request_priority.h" | 18 #include "net/base/request_priority.h" |
19 #include "net/dns/host_resolver.h" | 19 #include "net/dns/host_resolver.h" |
20 | 20 |
21 namespace base { | 21 namespace base { |
22 class DictionaryValue; | 22 class DictionaryValue; |
23 } | 23 } |
24 | 24 |
25 namespace net { | 25 namespace net { |
26 | 26 |
27 class ClientSocketHandle; | 27 class ClientSocketHandle; |
| 28 class NetLogWithSource; |
28 class StreamSocket; | 29 class StreamSocket; |
29 | 30 |
30 // ClientSocketPools are layered. This defines an interface for lower level | 31 // ClientSocketPools are layered. This defines an interface for lower level |
31 // socket pools to communicate with higher layer pools. | 32 // socket pools to communicate with higher layer pools. |
32 class NET_EXPORT HigherLayeredPool { | 33 class NET_EXPORT HigherLayeredPool { |
33 public: | 34 public: |
34 virtual ~HigherLayeredPool() {} | 35 virtual ~HigherLayeredPool() {} |
35 | 36 |
36 // Instructs the HigherLayeredPool to close an idle connection. Return true if | 37 // Instructs the HigherLayeredPool to close an idle connection. Return true if |
37 // one was closed. Closing an idle connection will call into the lower layer | 38 // one was closed. Closing an idle connection will call into the lower layer |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 const std::string& group_name, | 198 const std::string& group_name, |
198 const scoped_refptr<typename PoolType::SocketParams>& params, | 199 const scoped_refptr<typename PoolType::SocketParams>& params, |
199 int num_sockets, | 200 int num_sockets, |
200 const NetLogWithSource& net_log) { | 201 const NetLogWithSource& net_log) { |
201 pool->RequestSockets(group_name, ¶ms, num_sockets, net_log); | 202 pool->RequestSockets(group_name, ¶ms, num_sockets, net_log); |
202 } | 203 } |
203 | 204 |
204 } // namespace net | 205 } // namespace net |
205 | 206 |
206 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_H_ | 207 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |