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

Unified Diff: net/socket/transport_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/socket/transport_client_socket_pool.h ('k') | net/socket/transport_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/transport_client_socket_pool.cc
diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc
index 0949193ff2eefe1bd835e008ef955bd00e9ac8df..94f97c26c8a86f4510ad0ad8d758da5ee8b8f270 100644
--- a/net/socket/transport_client_socket_pool.cc
+++ b/net/socket/transport_client_socket_pool.cc
@@ -61,11 +61,9 @@ static base::LazyInstance<base::TimeTicks>::Leaky
TransportSocketParams::TransportSocketParams(
const HostPortPair& host_port_pair,
bool disable_resolver_cache,
- bool ignore_limits,
const OnHostResolutionCallback& host_resolution_callback,
CombineConnectAndWritePolicy combine_connect_and_write_if_supported)
: destination_(host_port_pair),
- ignore_limits_(ignore_limits),
host_resolution_callback_(host_resolution_callback),
combine_connect_and_write_(combine_connect_and_write_if_supported) {
if (disable_resolver_cache)
@@ -196,6 +194,7 @@ base::TimeDelta TransportConnectJobHelper::HistogramDuration(
TransportConnectJob::TransportConnectJob(
const std::string& group_name,
RequestPriority priority,
+ ClientSocketPool::RespectLimits respect_limits,
const scoped_refptr<TransportSocketParams>& params,
base::TimeDelta timeout_duration,
ClientSocketFactory* client_socket_factory,
@@ -205,6 +204,7 @@ TransportConnectJob::TransportConnectJob(
: ConnectJob(group_name,
timeout_duration,
priority,
+ respect_limits,
delegate,
BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)),
helper_(params, client_socket_factory, host_resolver, &connect_timing_),
@@ -487,15 +487,10 @@ TransportClientSocketPool::TransportConnectJobFactory::NewConnectJob(
const std::string& group_name,
const PoolBase::Request& request,
ConnectJob::Delegate* delegate) const {
- return scoped_ptr<ConnectJob>(
- new TransportConnectJob(group_name,
- request.priority(),
- request.params(),
- ConnectionTimeout(),
- client_socket_factory_,
- host_resolver_,
- delegate,
- net_log_));
+ return scoped_ptr<ConnectJob>(new TransportConnectJob(
+ group_name, request.priority(), request.respect_limits(),
+ request.params(), ConnectionTimeout(), client_socket_factory_,
+ host_resolver_, delegate, net_log_));
}
base::TimeDelta
@@ -523,20 +518,20 @@ TransportClientSocketPool::TransportClientSocketPool(
TransportClientSocketPool::~TransportClientSocketPool() {}
-int TransportClientSocketPool::RequestSocket(
- const std::string& group_name,
- const void* params,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) {
+int TransportClientSocketPool::RequestSocket(const std::string& group_name,
+ const void* params,
+ RequestPriority priority,
+ RespectLimits respect_limits,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) {
const scoped_refptr<TransportSocketParams>* casted_params =
static_cast<const scoped_refptr<TransportSocketParams>*>(params);
NetLogTcpClientSocketPoolRequestedSocket(net_log, casted_params);
- return base_.RequestSocket(group_name, *casted_params, priority, handle,
- callback, net_log);
+ return base_.RequestSocket(group_name, *casted_params, priority,
+ respect_limits, handle, callback, net_log);
}
void TransportClientSocketPool::NetLogTcpClientSocketPoolRequestedSocket(
« no previous file with comments | « net/socket/transport_client_socket_pool.h ('k') | net/socket/transport_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698