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

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

Issue 1580903002: Convert ignore_limits from a SocketParam to a socket request argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RespectLimits Created 4 years, 10 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
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/socks_client_socket_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 16 matching lines...) Expand all
27 : public base::RefCounted<SOCKSSocketParams> { 27 : public base::RefCounted<SOCKSSocketParams> {
28 public: 28 public:
29 SOCKSSocketParams(const scoped_refptr<TransportSocketParams>& proxy_server, 29 SOCKSSocketParams(const scoped_refptr<TransportSocketParams>& proxy_server,
30 bool socks_v5, const HostPortPair& host_port_pair); 30 bool socks_v5, const HostPortPair& host_port_pair);
31 31
32 const scoped_refptr<TransportSocketParams>& transport_params() const { 32 const scoped_refptr<TransportSocketParams>& transport_params() const {
33 return transport_params_; 33 return transport_params_;
34 } 34 }
35 const HostResolver::RequestInfo& destination() const { return destination_; } 35 const HostResolver::RequestInfo& destination() const { return destination_; }
36 bool is_socks_v5() const { return socks_v5_; } 36 bool is_socks_v5() const { return socks_v5_; }
37 bool ignore_limits() const { return ignore_limits_; }
38 37
39 private: 38 private:
40 friend class base::RefCounted<SOCKSSocketParams>; 39 friend class base::RefCounted<SOCKSSocketParams>;
41 ~SOCKSSocketParams(); 40 ~SOCKSSocketParams();
42 41
43 // The transport (likely TCP) connection must point toward the proxy server. 42 // The transport (likely TCP) connection must point toward the proxy server.
44 const scoped_refptr<TransportSocketParams> transport_params_; 43 const scoped_refptr<TransportSocketParams> transport_params_;
45 // This is the HTTP destination. 44 // This is the HTTP destination.
46 HostResolver::RequestInfo destination_; 45 HostResolver::RequestInfo destination_;
47 const bool socks_v5_; 46 const bool socks_v5_;
48 bool ignore_limits_;
49 47
50 DISALLOW_COPY_AND_ASSIGN(SOCKSSocketParams); 48 DISALLOW_COPY_AND_ASSIGN(SOCKSSocketParams);
51 }; 49 };
52 50
53 // SOCKSConnectJob handles the handshake to a socks server after setting up 51 // SOCKSConnectJob handles the handshake to a socks server after setting up
54 // an underlying transport socket. 52 // an underlying transport socket.
55 class SOCKSConnectJob : public ConnectJob { 53 class SOCKSConnectJob : public ConnectJob {
56 public: 54 public:
57 SOCKSConnectJob(const std::string& group_name, 55 SOCKSConnectJob(const std::string& group_name,
58 RequestPriority priority, 56 RequestPriority priority,
57 ClientSocketPool::RespectLimits respect_limits,
59 const scoped_refptr<SOCKSSocketParams>& params, 58 const scoped_refptr<SOCKSSocketParams>& params,
60 const base::TimeDelta& timeout_duration, 59 const base::TimeDelta& timeout_duration,
61 TransportClientSocketPool* transport_pool, 60 TransportClientSocketPool* transport_pool,
62 HostResolver* host_resolver, 61 HostResolver* host_resolver,
63 Delegate* delegate, 62 Delegate* delegate,
64 NetLog* net_log); 63 NetLog* net_log);
65 ~SOCKSConnectJob() override; 64 ~SOCKSConnectJob() override;
66 65
67 // ConnectJob methods. 66 // ConnectJob methods.
68 LoadState GetLoadState() const override; 67 LoadState GetLoadState() const override;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 HostResolver* host_resolver, 113 HostResolver* host_resolver,
115 TransportClientSocketPool* transport_pool, 114 TransportClientSocketPool* transport_pool,
116 NetLog* net_log); 115 NetLog* net_log);
117 116
118 ~SOCKSClientSocketPool() override; 117 ~SOCKSClientSocketPool() override;
119 118
120 // ClientSocketPool implementation. 119 // ClientSocketPool implementation.
121 int RequestSocket(const std::string& group_name, 120 int RequestSocket(const std::string& group_name,
122 const void* connect_params, 121 const void* connect_params,
123 RequestPriority priority, 122 RequestPriority priority,
123 RespectLimits respect_limits,
124 ClientSocketHandle* handle, 124 ClientSocketHandle* handle,
125 const CompletionCallback& callback, 125 const CompletionCallback& callback,
126 const BoundNetLog& net_log) override; 126 const BoundNetLog& net_log) override;
127 127
128 void RequestSockets(const std::string& group_name, 128 void RequestSockets(const std::string& group_name,
129 const void* params, 129 const void* params,
130 int num_sockets, 130 int num_sockets,
131 const BoundNetLog& net_log) override; 131 const BoundNetLog& net_log) override;
132 132
133 void CancelRequest(const std::string& group_name, 133 void CancelRequest(const std::string& group_name,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 TransportClientSocketPool* const transport_pool_; 198 TransportClientSocketPool* const transport_pool_;
199 PoolBase base_; 199 PoolBase base_;
200 200
201 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocketPool); 201 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocketPool);
202 }; 202 };
203 203
204 } // namespace net 204 } // namespace net
205 205
206 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_ 206 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/socks_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698