| Index: net/socket/ssl_client_socket_pool.cc
|
| diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
|
| index f9a405854b34e018d2aad8af16b0ebb0ba23a646..c5c37b3500efeddc91aeee8815c3a22786c6fd81 100644
|
| --- a/net/socket/ssl_client_socket_pool.cc
|
| +++ b/net/socket/ssl_client_socket_pool.cc
|
| @@ -45,19 +45,11 @@ SSLSocketParams::SSLSocketParams(
|
| ssl_config_(ssl_config),
|
| privacy_mode_(privacy_mode),
|
| load_flags_(load_flags),
|
| - expect_spdy_(expect_spdy),
|
| - ignore_limits_(false) {
|
| - if (direct_params_.get()) {
|
| - DCHECK(!socks_proxy_params_.get());
|
| - DCHECK(!http_proxy_params_.get());
|
| - ignore_limits_ = direct_params_->ignore_limits();
|
| - } else if (socks_proxy_params_.get()) {
|
| - DCHECK(!http_proxy_params_.get());
|
| - ignore_limits_ = socks_proxy_params_->ignore_limits();
|
| - } else {
|
| - DCHECK(http_proxy_params_.get());
|
| - ignore_limits_ = http_proxy_params_->ignore_limits();
|
| - }
|
| + expect_spdy_(expect_spdy) {
|
| + // Only one set of lower level pool params should be non-NULL.
|
| + DCHECK((direct_params_ && !socks_proxy_params_ && !http_proxy_params_) ||
|
| + (!direct_params_ && socks_proxy_params_ && !http_proxy_params_) ||
|
| + (!direct_params_ && !socks_proxy_params_ && http_proxy_params_));
|
| }
|
|
|
| SSLSocketParams::~SSLSocketParams() {}
|
| @@ -101,6 +93,7 @@ static const int kSSLHandshakeTimeoutInSeconds = 30;
|
|
|
| SSLConnectJob::SSLConnectJob(const std::string& group_name,
|
| RequestPriority priority,
|
| + ClientSocketPool::IgnoreLimits ignore_limits,
|
| const scoped_refptr<SSLSocketParams>& params,
|
| const base::TimeDelta& timeout_duration,
|
| TransportClientSocketPool* transport_pool,
|
| @@ -113,6 +106,7 @@ SSLConnectJob::SSLConnectJob(const std::string& group_name,
|
| : ConnectJob(group_name,
|
| timeout_duration,
|
| priority,
|
| + ignore_limits,
|
| delegate,
|
| BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)),
|
| params_(params),
|
| @@ -129,8 +123,7 @@ SSLConnectJob::SSLConnectJob(const std::string& group_name,
|
| ? "pm/" + context.ssl_session_cache_shard
|
| : context.ssl_session_cache_shard)),
|
| callback_(
|
| - base::Bind(&SSLConnectJob::OnIOComplete, base::Unretained(this))) {
|
| -}
|
| + base::Bind(&SSLConnectJob::OnIOComplete, base::Unretained(this))) {}
|
|
|
| SSLConnectJob::~SSLConnectJob() {
|
| }
|
| @@ -232,7 +225,8 @@ int SSLConnectJob::DoTransportConnect() {
|
| scoped_refptr<TransportSocketParams> direct_params =
|
| params_->GetDirectConnectionParams();
|
| return transport_socket_handle_->Init(group_name(), direct_params, priority(),
|
| - callback_, transport_pool_, net_log());
|
| + ignore_limits(), callback_,
|
| + transport_pool_, net_log());
|
| }
|
|
|
| int SSLConnectJob::DoTransportConnectComplete(int result) {
|
| @@ -252,8 +246,8 @@ int SSLConnectJob::DoSOCKSConnect() {
|
| scoped_refptr<SOCKSSocketParams> socks_proxy_params =
|
| params_->GetSocksProxyConnectionParams();
|
| return transport_socket_handle_->Init(group_name(), socks_proxy_params,
|
| - priority(), callback_, socks_pool_,
|
| - net_log());
|
| + priority(), ignore_limits(), callback_,
|
| + socks_pool_, net_log());
|
| }
|
|
|
| int SSLConnectJob::DoSOCKSConnectComplete(int result) {
|
| @@ -271,8 +265,8 @@ int SSLConnectJob::DoTunnelConnect() {
|
| scoped_refptr<HttpProxySocketParams> http_proxy_params =
|
| params_->GetHttpProxyConnectionParams();
|
| return transport_socket_handle_->Init(group_name(), http_proxy_params,
|
| - priority(), callback_, http_proxy_pool_,
|
| - net_log());
|
| + priority(), ignore_limits(), callback_,
|
| + http_proxy_pool_, net_log());
|
| }
|
|
|
| int SSLConnectJob::DoTunnelConnectComplete(int result) {
|
| @@ -558,17 +552,10 @@ scoped_ptr<ConnectJob> SSLClientSocketPool::SSLConnectJobFactory::NewConnectJob(
|
| const std::string& group_name,
|
| const PoolBase::Request& request,
|
| ConnectJob::Delegate* delegate) const {
|
| - return scoped_ptr<ConnectJob>(new SSLConnectJob(group_name,
|
| - request.priority(),
|
| - request.params(),
|
| - ConnectionTimeout(),
|
| - transport_pool_,
|
| - socks_pool_,
|
| - http_proxy_pool_,
|
| - client_socket_factory_,
|
| - context_,
|
| - delegate,
|
| - net_log_));
|
| + return scoped_ptr<ConnectJob>(new SSLConnectJob(
|
| + group_name, request.priority(), request.ignore_limits(), request.params(),
|
| + ConnectionTimeout(), transport_pool_, socks_pool_, http_proxy_pool_,
|
| + client_socket_factory_, context_, delegate, net_log_));
|
| }
|
|
|
| base::TimeDelta SSLClientSocketPool::SSLConnectJobFactory::ConnectionTimeout()
|
| @@ -579,6 +566,7 @@ base::TimeDelta SSLClientSocketPool::SSLConnectJobFactory::ConnectionTimeout()
|
| int SSLClientSocketPool::RequestSocket(const std::string& group_name,
|
| const void* socket_params,
|
| RequestPriority priority,
|
| + IgnoreLimits ignore_limits,
|
| ClientSocketHandle* handle,
|
| const CompletionCallback& callback,
|
| const BoundNetLog& net_log) {
|
| @@ -586,7 +574,7 @@ int SSLClientSocketPool::RequestSocket(const std::string& group_name,
|
| static_cast<const scoped_refptr<SSLSocketParams>*>(socket_params);
|
|
|
| return base_.RequestSocket(group_name, *casted_socket_params, priority,
|
| - handle, callback, net_log);
|
| + ignore_limits, handle, callback, net_log);
|
| }
|
|
|
| void SSLClientSocketPool::RequestSockets(
|
|
|