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

Unified Diff: remoting/host/server_log_entry_host.h

Issue 282063005: Pull out common code from client and host versions of ServerLogEntry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move ServerLogEntry to jingle_glue Created 6 years, 7 months 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/server_log_entry.cc ('k') | remoting/host/server_log_entry_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/server_log_entry_host.h
diff --git a/remoting/host/server_log_entry_host.h b/remoting/host/server_log_entry_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..efe7ad3b28ebcca8434561967fe9a796bd309fb0
--- /dev/null
+++ b/remoting/host/server_log_entry_host.h
@@ -0,0 +1,37 @@
+// Copyright 2014 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_HOST_H_
+#define REMOTING_HOST_SERVER_LOG_ENTRY_HOST_H_
+
+#include "remoting/host/host_exit_codes.h"
+#include "remoting/host/host_status_sender.h"
+#include "remoting/protocol/transport.h"
+
+namespace remoting {
+
+class ServerLogEntry;
+
+// Constructs a log entry for a session state change.
+// Currently this is either connection or disconnection.
+scoped_ptr<ServerLogEntry> MakeLogEntryForSessionStateChange(
+ bool connected);
+
+// Constructs a log entry for a heartbeat.
+scoped_ptr<ServerLogEntry> MakeLogEntryForHeartbeat();
+
+// Constructs a log entry for a host status message.
+scoped_ptr<ServerLogEntry> MakeLogEntryForHostStatus(
+ HostStatusSender::HostStatus host_status, HostExitCodes exit_code);
+
+// Adds fields describing the host to this log entry.
+void AddHostFieldsToLogEntry(ServerLogEntry* entry);
+
+// Adds a field describing connection type (direct/stun/relay).
+void AddConnectionTypeToLogEntry(ServerLogEntry* entry,
+ protocol::TransportRoute::RouteType type);
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_SERVER_LOG_ENTRY_HOST_H_
« no previous file with comments | « remoting/host/server_log_entry.cc ('k') | remoting/host/server_log_entry_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698