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

Unified Diff: remoting/protocol/connection_to_host.h

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
« no previous file with comments | « remoting/protocol/connection_to_client_unittest.cc ('k') | remoting/protocol/connection_to_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_host.h
diff --git a/remoting/protocol/connection_to_host.h b/remoting/protocol/connection_to_host.h
index 77fa497d20b1cce706b4ff3b3ae7759aa34c7924..cc8b691fb160c643384189d47fc56fd930ad52e0 100644
--- a/remoting/protocol/connection_to_host.h
+++ b/remoting/protocol/connection_to_host.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "remoting/jingle_glue/signal_strategy.h"
#include "remoting/proto/internal.pb.h"
+#include "remoting/protocol/errors.h"
#include "remoting/protocol/input_filter.h"
#include "remoting/protocol/message_reader.h"
#include "remoting/protocol/session.h"
@@ -52,20 +53,12 @@ class ConnectionToHost : public SignalStrategy::Listener,
CLOSED,
};
- enum Error {
- OK,
- HOST_IS_OFFLINE,
- SESSION_REJECTED,
- INCOMPATIBLE_PROTOCOL,
- NETWORK_FAILURE,
- };
-
class HostEventCallback {
public:
virtual ~HostEventCallback() {}
// Called when state of the connection changes.
- virtual void OnConnectionState(State state, Error error) = 0;
+ virtual void OnConnectionState(State state, ErrorCode error) = 0;
};
ConnectionToHost(base::MessageLoopProxy* message_loop,
@@ -116,12 +109,12 @@ class ConnectionToHost : public SignalStrategy::Listener,
// Callback for |video_reader_|.
void OnVideoPacket(VideoPacket* packet);
- void CloseOnError(Error error);
+ void CloseOnError(ErrorCode error);
// Stops writing in the channels.
void CloseChannels();
- void SetState(State state, Error error);
+ void SetState(State state, ErrorCode error);
scoped_refptr<base::MessageLoopProxy> message_loop_;
pp::Instance* pp_instance_;
@@ -148,7 +141,7 @@ class ConnectionToHost : public SignalStrategy::Listener,
// Internal state of the connection.
State state_;
- Error error_;
+ ErrorCode error_;
private:
DISALLOW_COPY_AND_ASSIGN(ConnectionToHost);
« no previous file with comments | « remoting/protocol/connection_to_client_unittest.cc ('k') | remoting/protocol/connection_to_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698