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

Unified Diff: remoting/client/server_log_entry_client.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/client/server_log_entry_client.h
diff --git a/remoting/client/server_log_entry_client.h b/remoting/client/server_log_entry_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..08b75b658251b46ce7643ede831171166ef658a2
--- /dev/null
+++ b/remoting/client/server_log_entry_client.h
@@ -0,0 +1,45 @@
+// 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_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_
+#define REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_
+
+#include "base/time/time.h"
+#include "remoting/protocol/connection_to_host.h"
+#include "remoting/protocol/errors.h"
+
+namespace remoting {
+
+class ChromotingStats;
+
+namespace protocol {
+class ServerLogEntry;
+} // namespace protocol
+
+// Constructs a log entry for a session state change.
rmsousa 2014/05/20 00:54:41 Nit: I think you could inherit from ServerLogEntry
Lambros 2014/05/20 01:13:35 I thought about that, but I'm not sure. The proble
+scoped_ptr<protocol::ServerLogEntry> MakeLogEntryForSessionStateChange(
+ protocol::ConnectionToHost::State state,
+ protocol::ErrorCode error);
+
+// Constructs a log entry for reporting statistics.
+scoped_ptr<protocol::ServerLogEntry> MakeLogEntryForStatistics(
+ ChromotingStats* statistics);
+
+// Constructs a log entry for reporting session ID is old.
+scoped_ptr<protocol::ServerLogEntry> MakeLogEntryForSessionIdOld(
+ const std::string& session_id);
+
+// Constructs a log entry for reporting session ID is old.
+scoped_ptr<protocol::ServerLogEntry> MakeLogEntryForSessionIdNew(
+ const std::string& session_id);
+
+void AddClientFieldsToLogEntry(protocol::ServerLogEntry* entry);
+void AddSessionIdToLogEntry(protocol::ServerLogEntry* entry,
+ const std::string& id);
+void AddSessionDurationToLogEntry(protocol::ServerLogEntry* entry,
+ base::TimeDelta duration);
+
+} // namespace remoting
+
+#endif // REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698