OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/signaling/server_log_entry.h" | 5 #include "remoting/signaling/server_log_entry.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
9 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
10 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 10 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 const char kValueModeIt2Me[] = "it2me"; | 28 const char kValueModeIt2Me[] = "it2me"; |
29 const char kValueModeMe2Me[] = "me2me"; | 29 const char kValueModeMe2Me[] = "me2me"; |
30 | 30 |
31 const char kKeyCpu[] = "cpu"; | 31 const char kKeyCpu[] = "cpu"; |
32 | 32 |
33 } // namespace | 33 } // namespace |
34 | 34 |
35 ServerLogEntry::ServerLogEntry() { | 35 ServerLogEntry::ServerLogEntry() { |
36 } | 36 } |
37 | 37 |
| 38 ServerLogEntry::ServerLogEntry(const ServerLogEntry& other) = default; |
| 39 |
38 ServerLogEntry::~ServerLogEntry() { | 40 ServerLogEntry::~ServerLogEntry() { |
39 } | 41 } |
40 | 42 |
41 void ServerLogEntry::Set(const std::string& key, const std::string& value) { | 43 void ServerLogEntry::Set(const std::string& key, const std::string& value) { |
42 values_map_[key] = value; | 44 values_map_[key] = value; |
43 } | 45 } |
44 | 46 |
45 void ServerLogEntry::AddCpuField() { | 47 void ServerLogEntry::AddCpuField() { |
46 Set(kKeyCpu, SysInfo::OperatingSystemArchitecture()); | 48 Set(kKeyCpu, SysInfo::OperatingSystemArchitecture()); |
47 } | 49 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 scoped_ptr<XmlElement> stanza(new XmlElement(QName( | 81 scoped_ptr<XmlElement> stanza(new XmlElement(QName( |
80 kChromotingXmlNamespace, kLogEntry))); | 82 kChromotingXmlNamespace, kLogEntry))); |
81 ValuesMap::const_iterator iter; | 83 ValuesMap::const_iterator iter; |
82 for (iter = values_map_.begin(); iter != values_map_.end(); ++iter) { | 84 for (iter = values_map_.begin(); iter != values_map_.end(); ++iter) { |
83 stanza->AddAttr(QName(std::string(), iter->first), iter->second); | 85 stanza->AddAttr(QName(std::string(), iter->first), iter->second); |
84 } | 86 } |
85 return stanza; | 87 return stanza; |
86 } | 88 } |
87 | 89 |
88 } // namespace remoting | 90 } // namespace remoting |
OLD | NEW |