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

Unified Diff: extensions/browser/api/cast_channel/keep_alive_delegate.cc

Issue 2891923004: [cast_channel] Make cast_channel related files not depend on "cast_channel.h" (Closed)
Patch Set: fix windows compile errors Created 3 years, 7 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
Index: extensions/browser/api/cast_channel/keep_alive_delegate.cc
diff --git a/extensions/browser/api/cast_channel/keep_alive_delegate.cc b/extensions/browser/api/cast_channel/keep_alive_delegate.cc
index 71adb89bf354497954bdca9797826654bf19b25a..c6803ebc9919cd1a9ba21586acfec881e408b95b 100644
--- a/extensions/browser/api/cast_channel/keep_alive_delegate.cc
+++ b/extensions/browser/api/cast_channel/keep_alive_delegate.cc
@@ -48,6 +48,8 @@ const char KeepAliveDelegate::kHeartbeatPingType[] = "PING";
// static
const char KeepAliveDelegate::kHeartbeatPongType[] = "PONG";
+using ::cast_channel::ChannelError;
+
// static
CastMessage KeepAliveDelegate::CreateKeepAliveMessage(
const char* message_type) {
@@ -146,19 +148,20 @@ void KeepAliveDelegate::SendKeepAliveMessageComplete(const char* message_type,
// An error occurred while sending the ping response.
VLOG(1) << "Error sending " << message_type;
logger_->LogSocketEventWithRv(socket_->id(), proto::PING_WRITE_ERROR, rv);
- OnError(cast_channel::CHANNEL_ERROR_SOCKET_ERROR);
+ OnError(ChannelError::CAST_SOCKET_ERROR);
}
}
void KeepAliveDelegate::LivenessTimeout() {
- OnError(cast_channel::CHANNEL_ERROR_PING_TIMEOUT);
+ OnError(ChannelError::PING_TIMEOUT);
Stop();
}
// CastTransport::Delegate interface.
void KeepAliveDelegate::OnError(ChannelError error_state) {
DCHECK(thread_checker_.CalledOnValidThread());
- VLOG(1) << "KeepAlive::OnError: " << error_state;
+ VLOG(1) << "KeepAlive::OnError: "
+ << ::cast_channel::ChannelErrorToString(error_state);
inner_delegate_->OnError(error_state);
Stop();
}

Powered by Google App Engine
This is Rietveld 408576698