OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/host/server_log_entry.h" | 5 #include "remoting/host/server_log_entry.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/stringize_macros.h" | 8 #include "base/strings/stringize_macros.h" |
9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 NOTREACHED(); | 133 NOTREACHED(); |
134 return NULL; | 134 return NULL; |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
138 scoped_ptr<XmlElement> ServerLogEntry::ToStanza() const { | 138 scoped_ptr<XmlElement> ServerLogEntry::ToStanza() const { |
139 scoped_ptr<XmlElement> stanza(new XmlElement(QName( | 139 scoped_ptr<XmlElement> stanza(new XmlElement(QName( |
140 kChromotingXmlNamespace, kLogEntry))); | 140 kChromotingXmlNamespace, kLogEntry))); |
141 ValuesMap::const_iterator iter; | 141 ValuesMap::const_iterator iter; |
142 for (iter = values_map_.begin(); iter != values_map_.end(); ++iter) { | 142 for (iter = values_map_.begin(); iter != values_map_.end(); ++iter) { |
143 stanza->AddAttr(QName("", iter->first), iter->second); | 143 stanza->AddAttr(QName(std::string(), iter->first), iter->second); |
144 } | 144 } |
145 return stanza.Pass(); | 145 return stanza.Pass(); |
146 } | 146 } |
147 | 147 |
148 // static | 148 // static |
149 const char* ServerLogEntry::GetValueSessionState(bool connected) { | 149 const char* ServerLogEntry::GetValueSessionState(bool connected) { |
150 return connected ? kValueSessionStateConnected : kValueSessionStateClosed; | 150 return connected ? kValueSessionStateConnected : kValueSessionStateClosed; |
151 } | 151 } |
152 | 152 |
153 void ServerLogEntry::Set(const std::string& key, const std::string& value) { | 153 void ServerLogEntry::Set(const std::string& key, const std::string& value) { |
154 values_map_[key] = value; | 154 values_map_[key] = value; |
155 } | 155 } |
156 | 156 |
157 } // namespace remoting | 157 } // namespace remoting |
OLD | NEW |