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

Side by Side 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: Added errors.cc and cleaned up switch statements. Created 5 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "remoting/protocol/errors.h"
6
7 #define RETURN_STRING_LITERAL(x) \
8 case x: \
9 return #x;
10
11 namespace remoting {
12 namespace protocol {
13
14 const char* ErrorCodeToString(ErrorCode error) {
15 switch (error) {
16 RETURN_STRING_LITERAL(OK);
17 RETURN_STRING_LITERAL(PEER_IS_OFFLINE);
18 RETURN_STRING_LITERAL(SESSION_REJECTED);
19 RETURN_STRING_LITERAL(INCOMPATIBLE_PROTOCOL);
20 RETURN_STRING_LITERAL(AUTHENTICATION_FAILED);
21 RETURN_STRING_LITERAL(CHANNEL_CONNECTION_ERROR);
22 RETURN_STRING_LITERAL(SIGNALING_ERROR);
23 RETURN_STRING_LITERAL(SIGNALING_TIMEOUT);
24 RETURN_STRING_LITERAL(HOST_OVERLOAD);
25 RETURN_STRING_LITERAL(UNKNOWN_ERROR);
26 }
27 NOTREACHED();
28 return nullptr;
29 }
30
31 } // namespace protocol
32 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698