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

Unified Diff: net/http/http_proxy_client_socket_pool.cc

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, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_proxy_client_socket_pool.h ('k') | net/http/http_proxy_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_proxy_client_socket_pool.cc
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index f0f8795a08a73b8705eb8a821c3a4d708144bd07..5368ab9684dd95aac19918db7a1e281943e20080 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -51,11 +51,6 @@ HttpProxySocketParams::HttpProxySocketParams(
proxy_delegate_(proxy_delegate) {
DCHECK((transport_params.get() == NULL && ssl_params.get() != NULL) ||
(transport_params.get() != NULL && ssl_params.get() == NULL));
- if (transport_params_.get()) {
- ignore_limits_ = transport_params->ignore_limits();
- } else {
- ignore_limits_ = ssl_params->ignore_limits();
- }
}
const HostResolver::RequestInfo& HttpProxySocketParams::destination() const {
@@ -81,6 +76,7 @@ static const int kHttpProxyConnectJobTimeoutInSeconds = 30;
HttpProxyConnectJob::HttpProxyConnectJob(
const std::string& group_name,
RequestPriority priority,
+ ClientSocketPool::RespectLimits respect_limits,
const scoped_refptr<HttpProxySocketParams>& params,
const base::TimeDelta& timeout_duration,
TransportClientSocketPool* transport_pool,
@@ -90,11 +86,13 @@ HttpProxyConnectJob::HttpProxyConnectJob(
: ConnectJob(group_name,
base::TimeDelta() /* The socket takes care of timeouts */,
priority,
+ respect_limits,
delegate,
BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)),
client_socket_(new HttpProxyClientSocketWrapper(
group_name,
priority,
+ respect_limits,
timeout_duration,
base::TimeDelta::FromSeconds(kHttpProxyConnectJobTimeoutInSeconds),
transport_pool,
@@ -177,14 +175,10 @@ HttpProxyClientSocketPool::HttpProxyConnectJobFactory::NewConnectJob(
const std::string& group_name,
const PoolBase::Request& request,
ConnectJob::Delegate* delegate) const {
- return scoped_ptr<ConnectJob>(new HttpProxyConnectJob(group_name,
- request.priority(),
- request.params(),
- ConnectionTimeout(),
- transport_pool_,
- ssl_pool_,
- delegate,
- net_log_));
+ return scoped_ptr<ConnectJob>(new HttpProxyConnectJob(
+ group_name, request.priority(), request.respect_limits(),
+ request.params(), ConnectionTimeout(), transport_pool_, ssl_pool_,
+ delegate, net_log_));
}
base::TimeDelta
@@ -217,15 +211,18 @@ HttpProxyClientSocketPool::HttpProxyClientSocketPool(
HttpProxyClientSocketPool::~HttpProxyClientSocketPool() {
}
-int HttpProxyClientSocketPool::RequestSocket(
- const std::string& group_name, const void* socket_params,
- RequestPriority priority, ClientSocketHandle* handle,
- const CompletionCallback& callback, const BoundNetLog& net_log) {
+int HttpProxyClientSocketPool::RequestSocket(const std::string& group_name,
+ const void* socket_params,
+ RequestPriority priority,
+ RespectLimits respect_limits,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) {
const scoped_refptr<HttpProxySocketParams>* casted_socket_params =
static_cast<const scoped_refptr<HttpProxySocketParams>*>(socket_params);
return base_.RequestSocket(group_name, *casted_socket_params, priority,
- handle, callback, net_log);
+ respect_limits, handle, callback, net_log);
}
void HttpProxyClientSocketPool::RequestSockets(
« no previous file with comments | « net/http/http_proxy_client_socket_pool.h ('k') | net/http/http_proxy_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698