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

Unified Diff: remoting/protocol/errors.cc

Issue 1238343002: Added ConnectionTimeObserver to calculate the times to authenticate and connect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unused headers. Created 5 years, 5 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/errors.h ('k') | remoting/remoting_srcs.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/errors.cc
diff --git a/remoting/protocol/errors.cc b/remoting/protocol/errors.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9c92e54d139f63909b39383db0bf5bf39e4bedd6
--- /dev/null
+++ b/remoting/protocol/errors.cc
@@ -0,0 +1,34 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/protocol/errors.h"
+
+#include "base/logging.h"
+
+namespace remoting {
+namespace protocol {
+
+#define RETURN_STRING_LITERAL(x) \
+case x: \
+return #x;
+
+const char* ErrorCodeToString(ErrorCode error) {
+ switch (error) {
+ RETURN_STRING_LITERAL(OK);
+ RETURN_STRING_LITERAL(PEER_IS_OFFLINE);
+ RETURN_STRING_LITERAL(SESSION_REJECTED);
+ RETURN_STRING_LITERAL(INCOMPATIBLE_PROTOCOL);
+ RETURN_STRING_LITERAL(AUTHENTICATION_FAILED);
+ RETURN_STRING_LITERAL(CHANNEL_CONNECTION_ERROR);
+ RETURN_STRING_LITERAL(SIGNALING_ERROR);
+ RETURN_STRING_LITERAL(SIGNALING_TIMEOUT);
+ RETURN_STRING_LITERAL(HOST_OVERLOAD);
+ RETURN_STRING_LITERAL(UNKNOWN_ERROR);
+ }
+ NOTREACHED();
+ return nullptr;
+}
+
+} // namespace protocol
+} // namespace remoting
« no previous file with comments | « remoting/protocol/errors.h ('k') | remoting/remoting_srcs.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698