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

Side by Side Diff: remoting/protocol/errors.cc

Issue 2807803002: Move name_value_map to remoting/base (Closed)
Patch Set: sync Created 3 years, 8 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
« no previous file with comments | « remoting/protocol/content_description.cc ('k') | remoting/protocol/jingle_messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/errors.h" 5 #include "remoting/protocol/errors.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "remoting/protocol/name_value_map.h" 8 #include "remoting/base/name_value_map.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 namespace protocol { 11 namespace protocol {
12 12
13 namespace { 13 namespace {
14 14
15 const NameMapElement<ErrorCode> kErrorCodeNames[] = { 15 const NameMapElement<ErrorCode> kErrorCodeNames[] = {
16 { OK, "OK" }, 16 { OK, "OK" },
17 { PEER_IS_OFFLINE, "PEER_IS_OFFLINE" }, 17 { PEER_IS_OFFLINE, "PEER_IS_OFFLINE" },
18 { SESSION_REJECTED, "SESSION_REJECTED" }, 18 { SESSION_REJECTED, "SESSION_REJECTED" },
(...skipping 14 matching lines...) Expand all
33 const char* ErrorCodeToString(ErrorCode error) { 33 const char* ErrorCodeToString(ErrorCode error) {
34 return ValueToName(kErrorCodeNames, error); 34 return ValueToName(kErrorCodeNames, error);
35 } 35 }
36 36
37 bool ParseErrorCode(const std::string& name, ErrorCode* result) { 37 bool ParseErrorCode(const std::string& name, ErrorCode* result) {
38 return NameToValue(kErrorCodeNames, name, result); 38 return NameToValue(kErrorCodeNames, name, result);
39 } 39 }
40 40
41 } // namespace protocol 41 } // namespace protocol
42 } // namespace remoting 42 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/content_description.cc ('k') | remoting/protocol/jingle_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698