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

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: 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/client/server_log_entry.cc ('k') | remoting/client/server_log_entry_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b2ef262897fb18edb2ceacf4a87c99bd36a4615e
--- /dev/null
+++ b/remoting/client/server_log_entry_client.h
@@ -0,0 +1,41 @@
+// 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;
+class ServerLogEntry;
+
+// Constructs a log entry for a session state change.
+scoped_ptr<ServerLogEntry> MakeLogEntryForSessionStateChange(
+ protocol::ConnectionToHost::State state,
+ protocol::ErrorCode error);
+
+// Constructs a log entry for reporting statistics.
+scoped_ptr<ServerLogEntry> MakeLogEntryForStatistics(
+ ChromotingStats* statistics);
+
+// Constructs a log entry for reporting session ID is old.
+scoped_ptr<ServerLogEntry> MakeLogEntryForSessionIdOld(
+ const std::string& session_id);
+
+// Constructs a log entry for reporting session ID is old.
+scoped_ptr<ServerLogEntry> MakeLogEntryForSessionIdNew(
+ const std::string& session_id);
+
+void AddClientFieldsToLogEntry(ServerLogEntry* entry);
+void AddSessionIdToLogEntry(ServerLogEntry* entry, const std::string& id);
+void AddSessionDurationToLogEntry(ServerLogEntry* entry,
+ base::TimeDelta duration);
+
+} // namespace remoting
+
+#endif // REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_
« no previous file with comments | « remoting/client/server_log_entry.cc ('k') | remoting/client/server_log_entry_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698