| Index: extensions/browser/api/cast_channel/cast_socket.cc
|
| diff --git a/extensions/browser/api/cast_channel/cast_socket.cc b/extensions/browser/api/cast_channel/cast_socket.cc
|
| index 3bb675cf3fd9f74b4424d13044a8cf14ba0d7d99..483b4f9795c8801ea9d9281b6af3631eae2820ce 100644
|
| --- a/extensions/browser/api/cast_channel/cast_socket.cc
|
| +++ b/extensions/browser/api/cast_channel/cast_socket.cc
|
| @@ -27,7 +27,6 @@
|
| #include "extensions/browser/api/cast_channel/cast_message_util.h"
|
| #include "extensions/browser/api/cast_channel/cast_transport.h"
|
| #include "extensions/browser/api/cast_channel/logger.h"
|
| -#include "extensions/browser/api/cast_channel/logger_util.h"
|
| #include "extensions/common/api/cast_channel/cast_channel.pb.h"
|
| #include "net/base/address_list.h"
|
| #include "net/base/host_port_pair.h"
|
| @@ -210,11 +209,8 @@ std::unique_ptr<net::SSLClientSocket> CastSocketImpl::CreateSslSocket(
|
|
|
| scoped_refptr<net::X509Certificate> CastSocketImpl::ExtractPeerCert() {
|
| net::SSLInfo ssl_info;
|
| - if (!socket_->GetSSLInfo(&ssl_info) || !ssl_info.cert.get()) {
|
| + if (!socket_->GetSSLInfo(&ssl_info) || !ssl_info.cert.get())
|
| return nullptr;
|
| - }
|
| -
|
| - logger_->LogSocketEvent(channel_id_, proto::SSL_INFO_OBTAINED);
|
|
|
| return ssl_info.cert;
|
| }
|
| @@ -225,8 +221,6 @@ bool CastSocketImpl::VerifyChannelPolicy(const AuthResult& result) {
|
| (device_capabilities_ & CastDeviceCapability::VIDEO_OUT) != 0) {
|
| LOG_WITH_CONNECTION(ERROR)
|
| << "Audio only channel policy enforced for video out capable device";
|
| - logger_->LogSocketEventWithDetails(
|
| - channel_id_, proto::CHANNEL_POLICY_ENFORCED, std::string());
|
| return false;
|
| }
|
| return true;
|
| @@ -260,8 +254,6 @@ void CastSocketImpl::Connect(std::unique_ptr<CastTransport::Delegate> delegate,
|
| delegate_ = std::move(delegate);
|
|
|
| if (ready_state_ != READY_STATE_NONE) {
|
| - logger_->LogSocketEventWithDetails(
|
| - channel_id_, proto::CONNECT_FAILED, "ReadyState not NONE");
|
| callback.Run(CHANNEL_ERROR_CONNECT_ERROR);
|
| return;
|
| }
|
| @@ -291,7 +283,6 @@ void CastSocketImpl::OnConnectTimeout() {
|
| DCHECK(CalledOnValidThread());
|
| // Stop all pending connection setup tasks and report back to the client.
|
| is_canceled_ = true;
|
| - logger_->LogSocketEvent(channel_id_, proto::CONNECT_TIMED_OUT);
|
| VLOG_WITH_CONNECTION(1) << "Timeout while establishing a connection.";
|
| SetErrorState(CHANNEL_ERROR_CONNECT_TIMEOUT);
|
| DoConnectCallback();
|
| @@ -362,7 +353,6 @@ void CastSocketImpl::DoConnectLoop(int result) {
|
|
|
| if (IsTerminalState(connect_state_)) {
|
| DCHECK_NE(rv, net::ERR_IO_PENDING);
|
| - logger_->LogSocketConnectState(channel_id_, connect_state_);
|
| GetTimer()->Stop();
|
| DoConnectCallback();
|
| } else {
|
| @@ -499,13 +489,9 @@ void CastSocketImpl::AuthTransportDelegate::OnMessage(
|
| const CastMessage& message) {
|
| if (!IsAuthMessage(message)) {
|
| error_state_ = CHANNEL_ERROR_TRANSPORT_ERROR;
|
| - socket_->logger_->LogSocketEvent(socket_->channel_id_,
|
| - proto::AUTH_CHALLENGE_REPLY_INVALID);
|
| socket_->PostTaskToStartConnectLoop(net::ERR_INVALID_RESPONSE);
|
| } else {
|
| socket_->challenge_reply_.reset(new CastMessage(message));
|
| - socket_->logger_->LogSocketEvent(socket_->channel_id_,
|
| - proto::RECEIVED_CHALLENGE_REPLY);
|
| socket_->PostTaskToStartConnectLoop(net::OK);
|
| }
|
| }
|
| @@ -586,7 +572,6 @@ void CastSocketImpl::CloseInternal() {
|
| send_auth_challenge_callback_.Cancel();
|
| connect_timeout_callback_.Cancel();
|
| SetReadyState(READY_STATE_CLOSED);
|
| - logger_->LogSocketEvent(channel_id_, proto::SOCKET_CLOSED);
|
| }
|
|
|
| bool CastSocketImpl::CalledOnValidThread() const {
|
| @@ -600,22 +585,18 @@ base::Timer* CastSocketImpl::GetTimer() {
|
| void CastSocketImpl::SetConnectState(proto::ConnectionState connect_state) {
|
| if (connect_state_ != connect_state) {
|
| connect_state_ = connect_state;
|
| - logger_->LogSocketConnectState(channel_id_, connect_state_);
|
| }
|
| }
|
|
|
| void CastSocketImpl::SetReadyState(ReadyState ready_state) {
|
| - if (ready_state_ != ready_state) {
|
| + if (ready_state_ != ready_state)
|
| ready_state_ = ready_state;
|
| - logger_->LogSocketReadyState(channel_id_, ReadyStateToProto(ready_state_));
|
| - }
|
| }
|
|
|
| void CastSocketImpl::SetErrorState(ChannelError error_state) {
|
| VLOG_WITH_CONNECTION(1) << "SetErrorState " << error_state;
|
| DCHECK_EQ(CHANNEL_ERROR_NONE, error_state_);
|
| error_state_ = error_state;
|
| - logger_->LogSocketErrorState(channel_id_, ErrorStateToProto(error_state_));
|
| delegate_->OnError(error_state_);
|
| }
|
| } // namespace cast_channel
|
|
|