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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 1696005: Add net log entries that summarize transmit and receive byte counts. (Closed)
Patch Set: More tests and address comments Created 10 years, 8 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/ssl_client_socket_nss.h ('k') | net/socket/ssl_client_socket_unittest.cc » ('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 7fdc4245d67427c2888aeb2dd7f1da152a42d1af..a033c797e007ba6e218151134174ff162e76e675 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -253,7 +253,8 @@ SSLClientSocketNSS::SSLClientSocketNSS(ClientSocket* transport_socket,
completed_handshake_(false),
next_handshake_state_(STATE_NONE),
nss_fd_(NULL),
- nss_bufs_(NULL) {
+ nss_bufs_(NULL),
+ net_log_(transport_socket->NetLog()) {
EnterFunction("");
}
@@ -281,8 +282,7 @@ int SSLClientSocketNSS::Init() {
return OK;
}
-int SSLClientSocketNSS::Connect(CompletionCallback* callback,
- const BoundNetLog& net_log) {
+int SSLClientSocketNSS::Connect(CompletionCallback* callback) {
EnterFunction("");
DCHECK(transport_.get());
DCHECK(next_handshake_state_ == STATE_NONE);
@@ -292,17 +292,17 @@ int SSLClientSocketNSS::Connect(CompletionCallback* callback,
DCHECK(!user_read_buf_);
DCHECK(!user_write_buf_);
- net_log.BeginEvent(NetLog::TYPE_SSL_CONNECT);
+ net_log_.BeginEvent(NetLog::TYPE_SSL_CONNECT);
int rv = Init();
if (rv != OK) {
- net_log.EndEvent(NetLog::TYPE_SSL_CONNECT);
+ net_log_.EndEvent(NetLog::TYPE_SSL_CONNECT);
return rv;
}
rv = InitializeSSLOptions();
if (rv != OK) {
- net_log.EndEvent(NetLog::TYPE_SSL_CONNECT);
+ net_log_.EndEvent(NetLog::TYPE_SSL_CONNECT);
return rv;
}
@@ -310,9 +310,8 @@ int SSLClientSocketNSS::Connect(CompletionCallback* callback,
rv = DoHandshakeLoop(OK);
if (rv == ERR_IO_PENDING) {
user_connect_callback_ = callback;
- net_log_ = net_log;
} else {
- net_log.EndEvent(NetLog::TYPE_SSL_CONNECT);
+ net_log_.EndEvent(NetLog::TYPE_SSL_CONNECT);
}
LeaveFunction("");
@@ -819,7 +818,6 @@ void SSLClientSocketNSS::OnHandshakeIOComplete(int result) {
int rv = DoHandshakeLoop(result);
if (rv != ERR_IO_PENDING) {
net_log_.EndEvent(net::NetLog::TYPE_SSL_CONNECT);
- net_log_ = BoundNetLog();
DoConnectCallback(rv);
}
LeaveFunction("");
« no previous file with comments | « net/socket/ssl_client_socket_nss.h ('k') | net/socket/ssl_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698