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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/plugin/host_script_object.cc ('k') | remoting/host/server_log_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/server_log_entry.h
diff --git a/remoting/host/server_log_entry.h b/remoting/host/server_log_entry.h
new file mode 100644
index 0000000000000000000000000000000000000000..1b1d452fb1d6c2daabc666957653453b97e5e23d
--- /dev/null
+++ b/remoting/host/server_log_entry.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_SERVER_LOG_ENTRY_H_
+#define REMOTING_HOST_SERVER_LOG_ENTRY_H_
+
+#include <map>
+#include <string>
+
+namespace buzz {
+class XmlElement;
+} // namespace buzz
+
+namespace remoting {
+
+class ServerLogEntry {
+ public:
+ // Constructs a log entry for a session state change.
+ // Currently this is either connection or disconnection.
+ static ServerLogEntry* MakeSessionStateChange(bool connection);
+
+ ~ServerLogEntry();
+
+ // Adds fields describing the host to this log entry.
+ void AddHostFields();
+
+ // Converts this object to an XML stanza.
+ // The caller takes ownership of the stanza.
+ buzz::XmlElement* ToStanza() const;
+
+ private:
+ typedef std::map<std::string, std::string> ValuesMap;
+
+ ServerLogEntry();
+ void Set(const char* key, const char* value);
+
+ static const char* GetValueSessionState(bool connected);
+
+ ValuesMap values_map_;
+};
+
+} // namespace remoting
+
+#endif
« no previous file with comments | « remoting/host/plugin/host_script_object.cc ('k') | remoting/host/server_log_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698