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

Side by Side Diff: net/socket/ssl_client_socket_pool.cc

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « net/socket/ssl_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool_unittest.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 #include "net/socket/ssl_client_socket_pool.h" 5 #include "net/socket/ssl_client_socket_pool.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 static const int kSSLHandshakeTimeoutInSeconds = 30; 170 static const int kSSLHandshakeTimeoutInSeconds = 30;
171 171
172 SSLConnectJob::SSLConnectJob(const std::string& group_name, 172 SSLConnectJob::SSLConnectJob(const std::string& group_name,
173 RequestPriority priority, 173 RequestPriority priority,
174 const scoped_refptr<SSLSocketParams>& params, 174 const scoped_refptr<SSLSocketParams>& params,
175 const base::TimeDelta& timeout_duration, 175 const base::TimeDelta& timeout_duration,
176 TransportClientSocketPool* transport_pool, 176 TransportClientSocketPool* transport_pool,
177 SOCKSClientSocketPool* socks_pool, 177 SOCKSClientSocketPool* socks_pool,
178 HttpProxyClientSocketPool* http_proxy_pool, 178 HttpProxyClientSocketPool* http_proxy_pool,
179 ClientSocketFactory* client_socket_factory, 179 ClientSocketFactory* client_socket_factory,
180 HostResolver* host_resolver,
181 const SSLClientSocketContext& context, 180 const SSLClientSocketContext& context,
182 const GetMessengerCallback& get_messenger_callback, 181 const GetMessengerCallback& get_messenger_callback,
183 Delegate* delegate, 182 Delegate* delegate,
184 NetLog* net_log) 183 NetLog* net_log)
185 : ConnectJob(group_name, 184 : ConnectJob(group_name,
186 timeout_duration, 185 timeout_duration,
187 priority, 186 priority,
188 delegate, 187 delegate,
189 BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)), 188 BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)),
190 params_(params), 189 params_(params),
191 transport_pool_(transport_pool), 190 transport_pool_(transport_pool),
192 socks_pool_(socks_pool), 191 socks_pool_(socks_pool),
193 http_proxy_pool_(http_proxy_pool), 192 http_proxy_pool_(http_proxy_pool),
194 client_socket_factory_(client_socket_factory), 193 client_socket_factory_(client_socket_factory),
195 host_resolver_(host_resolver),
196 context_(context.cert_verifier, 194 context_(context.cert_verifier,
197 context.channel_id_service, 195 context.channel_id_service,
198 context.transport_security_state, 196 context.transport_security_state,
199 context.cert_transparency_verifier, 197 context.cert_transparency_verifier,
200 context.cert_policy_enforcer, 198 context.cert_policy_enforcer,
201 (params->privacy_mode() == PRIVACY_MODE_ENABLED 199 (params->privacy_mode() == PRIVACY_MODE_ENABLED
202 ? "pm/" + context.ssl_session_cache_shard 200 ? "pm/" + context.ssl_session_cache_shard
203 : context.ssl_session_cache_shard)), 201 : context.ssl_session_cache_shard)),
204 io_callback_( 202 io_callback_(
205 base::Bind(&SSLConnectJob::OnIOComplete, base::Unretained(this))), 203 base::Bind(&SSLConnectJob::OnIOComplete, base::Unretained(this))),
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 const PoolBase::Request& request, 691 const PoolBase::Request& request,
694 ConnectJob::Delegate* delegate) const { 692 ConnectJob::Delegate* delegate) const {
695 return scoped_ptr<ConnectJob>(new SSLConnectJob(group_name, 693 return scoped_ptr<ConnectJob>(new SSLConnectJob(group_name,
696 request.priority(), 694 request.priority(),
697 request.params(), 695 request.params(),
698 ConnectionTimeout(), 696 ConnectionTimeout(),
699 transport_pool_, 697 transport_pool_,
700 socks_pool_, 698 socks_pool_,
701 http_proxy_pool_, 699 http_proxy_pool_,
702 client_socket_factory_, 700 client_socket_factory_,
703 host_resolver_,
704 context_, 701 context_,
705 get_messenger_callback_, 702 get_messenger_callback_,
706 delegate, 703 delegate,
707 net_log_)); 704 net_log_));
708 } 705 }
709 706
710 base::TimeDelta SSLClientSocketPool::SSLConnectJobFactory::ConnectionTimeout() 707 base::TimeDelta SSLClientSocketPool::SSLConnectJobFactory::ConnectionTimeout()
711 const { 708 const {
712 return timeout_; 709 return timeout_;
713 } 710 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 CHECK(it != messenger_map_.end()); 844 CHECK(it != messenger_map_.end());
848 delete it->second; 845 delete it->second;
849 messenger_map_.erase(it); 846 messenger_map_.erase(it);
850 } 847 }
851 848
852 void SSLClientSocketPool::OnSSLConfigChanged() { 849 void SSLClientSocketPool::OnSSLConfigChanged() {
853 FlushWithError(ERR_NETWORK_CHANGED); 850 FlushWithError(ERR_NETWORK_CHANGED);
854 } 851 }
855 852
856 } // namespace net 853 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698