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

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

Issue 2907263002: [Not for review] Add TRACE_EVENTs and chrome://flags for preconnect
Patch Set: Created 3 years, 6 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/quic/core/quic_crypto_client_stream.cc ('k') | no next file » | 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_impl.h" 5 #include "net/socket/ssl_client_socket_impl.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 1304
1305 void SSLClientSocketImpl::OnHandshakeIOComplete(int result) { 1305 void SSLClientSocketImpl::OnHandshakeIOComplete(int result) {
1306 int rv = DoHandshakeLoop(result); 1306 int rv = DoHandshakeLoop(result);
1307 if (rv != ERR_IO_PENDING) { 1307 if (rv != ERR_IO_PENDING) {
1308 LogConnectEndEvent(rv); 1308 LogConnectEndEvent(rv);
1309 DoConnectCallback(rv); 1309 DoConnectCallback(rv);
1310 } 1310 }
1311 } 1311 }
1312 1312
1313 int SSLClientSocketImpl::DoHandshakeLoop(int last_io_result) { 1313 int SSLClientSocketImpl::DoHandshakeLoop(int last_io_result) {
1314 TRACE_EVENT0(kNetTracingCategory, "SSLClientSocketImpl::DoHandshakeLoop"); 1314 TRACE_EVENT1("net", "SSLClientSocketImpl::DoHandshakeLoop", "host",
1315 host_and_port_.host());
1315 int rv = last_io_result; 1316 int rv = last_io_result;
1316 do { 1317 do {
1317 // Default to STATE_NONE for next state. 1318 // Default to STATE_NONE for next state.
1318 // (This is a quirk carried over from the windows 1319 // (This is a quirk carried over from the windows
1319 // implementation. It makes reading the logs a bit harder.) 1320 // implementation. It makes reading the logs a bit harder.)
1320 // State handlers can and often do call GotoState just 1321 // State handlers can and often do call GotoState just
1321 // to stay in the current state. 1322 // to stay in the current state.
1322 State state = next_handshake_state_; 1323 State state = next_handshake_state_;
1323 next_handshake_state_ = STATE_NONE; 1324 next_handshake_state_ = STATE_NONE;
1324 switch (state) { 1325 switch (state) {
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 if (ERR_GET_REASON(info->error_code) == SSL_R_TLSV1_ALERT_ACCESS_DENIED && 1980 if (ERR_GET_REASON(info->error_code) == SSL_R_TLSV1_ALERT_ACCESS_DENIED &&
1980 !certificate_requested_) { 1981 !certificate_requested_) {
1981 net_error = ERR_SSL_PROTOCOL_ERROR; 1982 net_error = ERR_SSL_PROTOCOL_ERROR;
1982 } 1983 }
1983 } 1984 }
1984 1985
1985 return net_error; 1986 return net_error;
1986 } 1987 }
1987 1988
1988 } // namespace net 1989 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_crypto_client_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698