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

Unified Diff: remoting/client/plugin/pepper_view.cc

Issue 9567033: Cleanup error handling in the client plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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: remoting/client/plugin/pepper_view.cc
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc
index 27ce1bc9762493097b2dbe9fbd83976da5b6dce6..5c56c9fd4bd58bcdb0643dbd4b5f30332ff4f402 100644
--- a/remoting/client/plugin/pepper_view.cc
+++ b/remoting/client/plugin/pepper_view.cc
@@ -32,17 +32,24 @@ namespace {
const size_t kMaxPendingBuffersCount = 2;
ChromotingInstance::ConnectionError ConvertConnectionError(
- protocol::ConnectionToHost::Error error) {
+ protocol::ErrorCode error) {
switch (error) {
- case protocol::ConnectionToHost::OK:
+ case protocol::OK:
return ChromotingInstance::ERROR_NONE;
- case protocol::ConnectionToHost::HOST_IS_OFFLINE:
+
+ case protocol::PEER_IS_OFFLINE:
return ChromotingInstance::ERROR_HOST_IS_OFFLINE;
- case protocol::ConnectionToHost::SESSION_REJECTED:
+
+ case protocol::SESSION_REJECTED:
+ case protocol::AUTHENTICATION_FAILED:
return ChromotingInstance::ERROR_SESSION_REJECTED;
- case protocol::ConnectionToHost::INCOMPATIBLE_PROTOCOL:
+
+ case protocol::INCOMPATIBLE_PROTOCOL:
return ChromotingInstance::ERROR_INCOMPATIBLE_PROTOCOL;
- case protocol::ConnectionToHost::NETWORK_FAILURE:
+
+ case protocol::CHANNEL_CONNECTION_ERROR:
+ case protocol::SIGNALING_TIMEOUT:
+ case protocol::UNKNOWN_ERROR:
return ChromotingInstance::ERROR_NETWORK_FAILURE;
}
DLOG(FATAL) << "Unknown error code" << error;
@@ -97,7 +104,7 @@ void PepperView::TearDown() {
}
void PepperView::SetConnectionState(protocol::ConnectionToHost::State state,
- protocol::ConnectionToHost::Error error) {
+ protocol::ErrorCode error) {
DCHECK(context_->main_message_loop()->BelongsToCurrentThread());
switch (state) {

Powered by Google App Engine
This is Rietveld 408576698