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

Side by Side Diff: remoting/host/server_log_entry.h

Issue 8468015: The host sends simple log entries to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 #ifndef REMOTING_HOST_SERVER_LOG_ENTRY_H_
6 #define REMOTING_HOST_SERVER_LOG_ENTRY_H_
7
8 #include <map>
9 #include <string>
10
11 namespace buzz {
12 class XmlElement;
13 } // namespace buzz
14
15 namespace remoting {
16
17 class ServerLogEntry {
18 public:
19 // Constructs a log entry for a session state change.
20 // Currently this is either connection or disconnection.
21 static ServerLogEntry* MakeSessionStateChange(bool connection);
22
23 ~ServerLogEntry();
24
25 // Adds fields describing the host to this log entry.
26 void AddHostFields();
27
28 // Converts this object to an XML stanza.
29 // The caller takes ownership of the stanza.
30 buzz::XmlElement* ToStanza() const;
31
32 private:
33 typedef std::map<std::string, std::string> KeyValuePairs;
Sergey Ulanov 2011/11/22 02:01:43 nit: ValuesMap?
simonmorris 2011/11/22 23:27:35 Done.
34
35 ServerLogEntry();
36 void Set(const char* key, const char* value);
Sergey Ulanov 2011/11/22 02:01:43 nit: Should this be public
simonmorris 2011/11/22 23:27:35 No. This way the ServerLogEntry class controls the
37
38 static const char* GetValueSessionState(bool connected);
39
40 KeyValuePairs keyValuePairs_;
41 };
42
43 } // namespace remoting
44
45 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698