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

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

Issue 364943002: Makes waiting SSLConnectJobs use the message loops to resume their connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed messenger's handling of failed jobs, and switched to use ThreadTaskRunnerHandle Created 6 years, 5 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 | « no previous file | net/socket/ssl_client_socket_pool.h » ('j') | net/socket/ssl_client_socket_pool.h » ('J')
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 // OpenSSL binding for SSLClientSocket. The class layout and general principle 5 // OpenSSL binding for SSLClientSocket. The class layout and general principle
6 // of operation is derived from SSLClientSocketNSS. 6 // of operation is derived from SSLClientSocketNSS.
7 7
8 #include "net/socket/ssl_client_socket_openssl.h" 8 #include "net/socket/ssl_client_socket_openssl.h"
9 9
10 #include <openssl/err.h> 10 #include <openssl/err.h>
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 const base::Closure& callback) { 387 const base::Closure& callback) {
388 error_callback_ = callback; 388 error_callback_ = callback;
389 } 389 }
390 390
391 void SSLClientSocketOpenSSL::SetIsLeader() { 391 void SSLClientSocketOpenSSL::SetIsLeader() {
392 is_leader_ = true; 392 is_leader_ = true;
393 } 393 }
394 394
395 void SSLClientSocketOpenSSL::OnSocketFailure() { 395 void SSLClientSocketOpenSSL::OnSocketFailure() {
396 if (is_leader_) { 396 if (is_leader_) {
397 error_callback_.Run(); 397 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, error_callback_);
398 error_callback_ = base::Closure(); 398 error_callback_ = base::Closure();
399 is_leader_ = false; 399 is_leader_ = false;
400 } 400 }
401 } 401 }
402 402
403 void SSLClientSocketOpenSSL::GetSSLCertRequestInfo( 403 void SSLClientSocketOpenSSL::GetSSLCertRequestInfo(
404 SSLCertRequestInfo* cert_request_info) { 404 SSLCertRequestInfo* cert_request_info) {
405 cert_request_info->host_and_port = host_and_port_; 405 cert_request_info->host_and_port = host_and_port_;
406 cert_request_info->cert_authorities = cert_authorities_; 406 cert_request_info->cert_authorities = cert_authorities_;
407 cert_request_info->cert_key_types = cert_key_types_; 407 cert_request_info->cert_key_types = cert_key_types_;
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 DVLOG(2) << "next protocol: '" << npn_proto_ << "' status: " << npn_status_; 1475 DVLOG(2) << "next protocol: '" << npn_proto_ << "' status: " << npn_status_;
1476 return SSL_TLSEXT_ERR_OK; 1476 return SSL_TLSEXT_ERR_OK;
1477 } 1477 }
1478 1478
1479 scoped_refptr<X509Certificate> 1479 scoped_refptr<X509Certificate>
1480 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { 1480 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const {
1481 return server_cert_; 1481 return server_cert_;
1482 } 1482 }
1483 1483
1484 } // namespace net 1484 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_pool.h » ('j') | net/socket/ssl_client_socket_pool.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698