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 #ifndef REMOTING_SIGNALING_SERVER_LOG_ENTRY_H_ | 5 #ifndef REMOTING_SIGNALING_SERVER_LOG_ENTRY_H_ |
6 #define REMOTING_SIGNALING_SERVER_LOG_ENTRY_H_ | 6 #define REMOTING_SIGNALING_SERVER_LOG_ENTRY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
| 9 #include <memory> |
9 #include <string> | 10 #include <string> |
10 | 11 |
11 #include "base/memory/scoped_ptr.h" | |
12 | 12 |
13 namespace buzz { | 13 namespace buzz { |
14 class XmlElement; | 14 class XmlElement; |
15 } // namespace buzz | 15 } // namespace buzz |
16 | 16 |
17 namespace remoting { | 17 namespace remoting { |
18 | 18 |
19 // Utility class for building log entries to send to the remoting bot. This is | 19 // Utility class for building log entries to send to the remoting bot. This is |
20 // a wrapper around a key/value map and is copyable so it can be used in STL | 20 // a wrapper around a key/value map and is copyable so it can be used in STL |
21 // containers. | 21 // containers. |
(...skipping 20 matching lines...) Expand all Loading... |
42 | 42 |
43 // Adds a field describing the role (client/host). | 43 // Adds a field describing the role (client/host). |
44 void AddRoleField(const char* role); | 44 void AddRoleField(const char* role); |
45 | 45 |
46 // Adds a field describing the type of log entry. | 46 // Adds a field describing the type of log entry. |
47 void AddEventNameField(const char* name); | 47 void AddEventNameField(const char* name); |
48 | 48 |
49 // Constructs a log stanza. The caller should add one or more log entry | 49 // Constructs a log stanza. The caller should add one or more log entry |
50 // stanzas as children of this stanza, before sending the log stanza to | 50 // stanzas as children of this stanza, before sending the log stanza to |
51 // the remoting bot. | 51 // the remoting bot. |
52 static scoped_ptr<buzz::XmlElement> MakeStanza(); | 52 static std::unique_ptr<buzz::XmlElement> MakeStanza(); |
53 | 53 |
54 // Converts this object to an XML stanza. | 54 // Converts this object to an XML stanza. |
55 scoped_ptr<buzz::XmlElement> ToStanza() const; | 55 std::unique_ptr<buzz::XmlElement> ToStanza() const; |
56 | 56 |
57 private: | 57 private: |
58 typedef std::map<std::string, std::string> ValuesMap; | 58 typedef std::map<std::string, std::string> ValuesMap; |
59 | 59 |
60 ValuesMap values_map_; | 60 ValuesMap values_map_; |
61 }; | 61 }; |
62 | 62 |
63 } // namespace remoting | 63 } // namespace remoting |
64 | 64 |
65 #endif // REMOTING_SIGNALING_SERVER_LOG_ENTRY_H_ | 65 #endif // REMOTING_SIGNALING_SERVER_LOG_ENTRY_H_ |
OLD | NEW |