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

Unified Diff: remoting/host/host_event_logger_win.cc

Issue 10893009: Log when the host is started for an account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add shutdown log Created 8 years, 4 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/host_event_logger_win.cc
diff --git a/remoting/host/host_event_logger_win.cc b/remoting/host/host_event_logger_win.cc
index 85f31d26c1d01c8168d17dd46cb134eaa6a984b9..0c2d5b277305095ba71c38398c876c64a80e0401 100644
--- a/remoting/host/host_event_logger_win.cc
+++ b/remoting/host/host_event_logger_win.cc
@@ -38,9 +38,11 @@ class HostEventLoggerWin : public HostEventLogger, public HostStatusObserver {
const std::string& jid,
const std::string& channel_name,
const protocol::TransportRoute& route) OVERRIDE;
+ virtual void OnStart(const std::string& xmpp_login) OVERRIDE;
virtual void OnShutdown() OVERRIDE;
private:
+ void LogEvent(WORD type, DWORD event_id);
void LogString(WORD type, DWORD event_id, const std::string& string);
void Log(WORD type, DWORD event_id, const std::vector<std::string>& strings);
@@ -101,6 +103,11 @@ void HostEventLoggerWin::OnClientRouteChange(
}
void HostEventLoggerWin::OnShutdown() {
+ LogEvent(EVENTLOG_INFORMATION_TYPE, MSG_HOST_SHUTDOWN);
+}
+
+void HostEventLoggerWin::OnStart(const std::string& xmpp_login) {
+ LogString(EVENTLOG_INFORMATION_TYPE, MSG_HOST_STARTED, xmpp_login);
}
void HostEventLoggerWin::Log(WORD type,
@@ -139,6 +146,11 @@ void HostEventLoggerWin::LogString(WORD type,
Log(type, event_id, strings);
}
+void HostEventLoggerWin::LogEvent(WORD type,
+ DWORD event_id) {
+ Log(type, event_id, std::vector<std:string>(0));
+}
+
// static
scoped_ptr<HostEventLogger> HostEventLogger::Create(
ChromotingHost* host, const std::string& application_name) {

Powered by Google App Engine
This is Rietveld 408576698