Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/api/cast_channel/cast_socket.h" | 5 #include "extensions/browser/api/cast_channel/cast_socket.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 << *cert; | 170 << *cert; |
| 171 } | 171 } |
| 172 | 172 |
| 173 logger_->LogSocketEventWithRv( | 173 logger_->LogSocketEventWithRv( |
| 174 channel_id_, proto::DER_ENCODED_CERT_OBTAIN, result ? 1 : 0); | 174 channel_id_, proto::DER_ENCODED_CERT_OBTAIN, result ? 1 : 0); |
| 175 return result; | 175 return result; |
| 176 } | 176 } |
| 177 | 177 |
| 178 bool CastSocket::VerifyChallengeReply() { | 178 bool CastSocket::VerifyChallengeReply() { |
| 179 AuthResult result = AuthenticateChallengeReply(*challenge_reply_, peer_cert_); | 179 AuthResult result = AuthenticateChallengeReply(*challenge_reply_, peer_cert_); |
| 180 if (result.success()) { | |
|
mark a. foltz
2014/10/31 22:29:26
Did you intend to submit this change?
If so, is er
| |
| 181 VLOG(1) << result.error_message; | |
| 182 } | |
| 180 logger_->LogSocketChallengeReplyEvent(channel_id_, result); | 183 logger_->LogSocketChallengeReplyEvent(channel_id_, result); |
| 181 return result.success(); | 184 return result.success(); |
| 182 } | 185 } |
| 183 | 186 |
| 184 void CastSocket::Connect(const net::CompletionCallback& callback) { | 187 void CastSocket::Connect(const net::CompletionCallback& callback) { |
| 185 DCHECK(CalledOnValidThread()); | 188 DCHECK(CalledOnValidThread()); |
| 186 VLOG_WITH_CONNECTION(1) << "Connect readyState = " << ready_state_; | 189 VLOG_WITH_CONNECTION(1) << "Connect readyState = " << ready_state_; |
| 187 if (ready_state_ != READY_STATE_NONE) { | 190 if (ready_state_ != READY_STATE_NONE) { |
| 188 logger_->LogSocketEventWithDetails( | 191 logger_->LogSocketEventWithDetails( |
| 189 channel_id_, proto::CONNECT_FAILED, "ReadyState not NONE"); | 192 channel_id_, proto::CONNECT_FAILED, "ReadyState not NONE"); |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 877 } | 880 } |
| 878 | 881 |
| 879 CastSocket::WriteRequest::~WriteRequest() { | 882 CastSocket::WriteRequest::~WriteRequest() { |
| 880 } | 883 } |
| 881 | 884 |
| 882 } // namespace cast_channel | 885 } // namespace cast_channel |
| 883 } // namespace core_api | 886 } // namespace core_api |
| 884 } // namespace extensions | 887 } // namespace extensions |
| 885 | 888 |
| 886 #undef VLOG_WITH_CONNECTION | 889 #undef VLOG_WITH_CONNECTION |
| OLD | NEW |