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

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

Issue 1808001: Implement a 15 connection per proxy server limit. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Remove extra newline. Created 10 years, 8 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_SOCKS_CLIENT_SOCKET_POOL_H_ 5 #ifndef NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_
6 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_ 6 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "net/base/host_port_pair.h"
14 #include "net/base/host_resolver.h" 15 #include "net/base/host_resolver.h"
15 #include "net/proxy/proxy_server.h" 16 #include "net/proxy/proxy_server.h"
16 #include "net/socket/client_socket_pool_base.h" 17 #include "net/socket/client_socket_pool_base.h"
17 #include "net/socket/client_socket_pool.h" 18 #include "net/socket/client_socket_pool.h"
18 #include "net/socket/tcp_client_socket_pool.h" 19 #include "net/socket/tcp_client_socket_pool.h"
19 20
20 namespace net { 21 namespace net {
21 22
22 class ClientSocketFactory; 23 class ClientSocketFactory;
23 class ConnectJobFactory; 24 class ConnectJobFactory;
24 25
25 class SOCKSSocketParams { 26 class SOCKSSocketParams {
26 public: 27 public:
27 SOCKSSocketParams(const TCPSocketParams& proxy_server, bool socks_v5, 28 SOCKSSocketParams(const TCPSocketParams& proxy_server, bool socks_v5,
28 const std::string& destination_host, int destination_port, 29 const HostPortPair& host_port_pair,
29 RequestPriority priority, const GURL& referrer) 30 RequestPriority priority, const GURL& referrer)
30 : tcp_params_(proxy_server), 31 : tcp_params_(proxy_server),
31 destination_(destination_host, destination_port), 32 destination_(host_port_pair.host, host_port_pair.port),
32 socks_v5_(socks_v5) { 33 socks_v5_(socks_v5) {
33 // The referrer is used by the DNS prefetch system to correlate resolutions 34 // The referrer is used by the DNS prefetch system to correlate resolutions
34 // with the page that triggered them. It doesn't impact the actual addresses 35 // with the page that triggered them. It doesn't impact the actual addresses
35 // that we resolve to. 36 // that we resolve to.
36 destination_.set_referrer(referrer); 37 destination_.set_referrer(referrer);
37 destination_.set_priority(priority); 38 destination_.set_priority(priority);
38 } 39 }
39 40
40 const TCPSocketParams& tcp_params() const { return tcp_params_; } 41 const TCPSocketParams& tcp_params() const { return tcp_params_; }
41 const HostResolver::RequestInfo& destination() const { return destination_; } 42 const HostResolver::RequestInfo& destination() const { return destination_; }
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 PoolBase base_; 177 PoolBase base_;
177 178
178 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocketPool); 179 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocketPool);
179 }; 180 };
180 181
181 REGISTER_SOCKET_PARAMS_FOR_POOL(SOCKSClientSocketPool, SOCKSSocketParams) 182 REGISTER_SOCKET_PARAMS_FOR_POOL(SOCKSClientSocketPool, SOCKSSocketParams)
182 183
183 } // namespace net 184 } // namespace net
184 185
185 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_ 186 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698