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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 8784003: base::Bind: Convert SSLHostInfo::WaitForDataReady. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years 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/ssl_client_socket_nss.h ('k') | net/socket/ssl_host_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_nss.cc
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index 2595350e7548256bfcf2f76827236ee2bde15d8e..18c0cf7ae9f57b3fd09f5f3a4e66f20e3543e3f0 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -65,6 +65,7 @@
#include <map>
#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/memory/singleton.h"
@@ -439,7 +440,8 @@ SSLClientSocketNSS::SSLClientSocketNSS(ClientSocketHandle* transport_socket,
transport_recv_busy_(false),
corked_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(handshake_io_callback_(
- this, &SSLClientSocketNSS::OnHandshakeIOComplete)),
+ base::Bind(&SSLClientSocketNSS::OnHandshakeIOComplete,
+ base::Unretained(this)))),
transport_(transport_socket),
host_and_port_(host_and_port),
ssl_config_(ssl_config),
@@ -1386,7 +1388,7 @@ bool SSLClientSocketNSS::LoadSSLHostInfo() {
int SSLClientSocketNSS::DoLoadSSLHostInfo() {
EnterFunction("");
- int rv = ssl_host_info_->WaitForDataReady(&handshake_io_callback_);
+ int rv = ssl_host_info_->WaitForDataReady(handshake_io_callback_);
GotoState(STATE_HANDSHAKE);
if (rv == OK) {
@@ -1667,7 +1669,7 @@ int SSLClientSocketNSS::DoVerifyCert(int result) {
UMA_HISTOGRAM_TIMES("Net.SSLVerificationMergedMsSaved",
end_time - ssl_host_info_->verification_start_time());
server_cert_verify_result_ = &ssl_host_info_->cert_verify_result();
- return ssl_host_info_->WaitForCertVerification(&handshake_io_callback_);
+ return ssl_host_info_->WaitForCertVerification(handshake_io_callback_);
} else {
UMA_HISTOGRAM_ENUMERATION("Net.SSLVerificationMerged", 0 /* false */, 2);
}
@@ -1875,7 +1877,7 @@ void SSLClientSocketNSS::SaveSSLHostInfo() {
// If the SSLHostInfo hasn't managed to load from disk yet then we can't save
// anything.
- if (ssl_host_info_->WaitForDataReady(NULL) != OK)
+ if (ssl_host_info_->WaitForDataReady(net::CompletionCallback()) != OK)
return;
SSLHostInfo::State* state = ssl_host_info_->mutable_state();
« no previous file with comments | « net/socket/ssl_client_socket_nss.h ('k') | net/socket/ssl_host_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698