Commit 8190d385 authored by kmarshall's avatar kmarshall Committed by Commit bot

Add result logging for TCP and SSL connection setup.

BUG=

Review URL: https://codereview.chromium.org/845063002

Cr-Commit-Position: refs/heads/master@{#311585}
parent 300f7a40
......@@ -379,6 +379,8 @@ int CastSocketImpl::DoTcpConnect() {
int CastSocketImpl::DoTcpConnectComplete(int connect_result) {
VLOG_WITH_CONNECTION(1) << "DoTcpConnectComplete: " << connect_result;
logger_->LogSocketEventWithRv(channel_id_, proto::TCP_SOCKET_CONNECT_COMPLETE,
connect_result);
if (connect_result == net::OK) {
// Enable TCP-level keep-alive handling.
// TODO(kmarshall): Remove TCP keep-alive once protocol-level ping handling
......@@ -407,6 +409,8 @@ int CastSocketImpl::DoSslConnect() {
}
int CastSocketImpl::DoSslConnectComplete(int result) {
logger_->LogSocketEventWithRv(channel_id_, proto::SSL_SOCKET_CONNECT_COMPLETE,
result);
VLOG_WITH_CONNECTION(1) << "DoSslConnectComplete: " << result;
if (result == net::ERR_CERT_AUTHORITY_INVALID &&
peer_cert_.empty() && ExtractPeerCert(&peer_cert_)) {
......
......@@ -37,6 +37,8 @@ enum EventType {
SOCKET_CLOSED = 25;
SSL_CERT_EXCESSIVE_LIFETIME = 26;
CHANNEL_POLICY_ENFORCED = 27;
TCP_SOCKET_CONNECT_COMPLETE = 28; // Logged with RV.
SSL_SOCKET_CONNECT_COMPLETE = 29; // Logged with RV.
}
enum ChannelAuth {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment