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

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: 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
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..71a72bc71708eb96f63b4f52298d8fa41d3c83c7
--- /dev/null
+++ b/remoting/host/server_log_entry_host.h
@@ -0,0 +1,39 @@
+// 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 {
+
+namespace protocol {
+class ServerLogEntry;
+} // namespace protocol
+
+// Constructs a log entry for a session state change.
+// Currently this is either connection or disconnection.
+scoped_ptr<protocol::ServerLogEntry> MakeLogEntryForSessionStateChange(
+ bool connected);
+
+// Constructs a log entry for a heartbeat.
+scoped_ptr<protocol::ServerLogEntry> MakeLogEntryForHeartbeat();
+
+// Constructs a log entry for a host status message.
+scoped_ptr<protocol::ServerLogEntry> MakeLogEntryForHostStatus(
+ HostStatusSender::HostStatus host_status, HostExitCodes exit_code);
+
+// Adds fields describing the host to this log entry.
+void AddHostFieldsToLogEntry(protocol::ServerLogEntry* entry);
+
+// Adds a field describing connection type (direct/stun/relay).
+void AddConnectionTypeToLogEntry(protocol::ServerLogEntry* entry,
+ protocol::TransportRoute::RouteType type);
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_SERVER_LOG_ENTRY_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698