[email protected] | 5fef892 | 2012-01-13 22:38:24 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef REMOTING_HOST_HOST_EVENT_LOGGER_H_ | ||||
6 | #define REMOTING_HOST_HOST_EVENT_LOGGER_H_ | ||||
7 | |||||
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 8 | #include <memory> |
[email protected] | 5fef892 | 2012-01-13 22:38:24 | [diff] [blame] | 9 | #include <string> |
10 | |||||
11 | #include "base/compiler_specific.h" | ||||
avi | c5960f3 | 2015-12-22 22:49:48 | [diff] [blame] | 12 | #include "base/macros.h" |
[email protected] | 9cfb0c3 | 2013-03-02 04:27:49 | [diff] [blame] | 13 | #include "base/memory/weak_ptr.h" |
[email protected] | 5fef892 | 2012-01-13 22:38:24 | [diff] [blame] | 14 | |
15 | namespace remoting { | ||||
16 | |||||
[email protected] | 9cfb0c3 | 2013-03-02 04:27:49 | [diff] [blame] | 17 | class HostStatusMonitor; |
[email protected] | 8144871 | 2012-01-17 20:30:11 | [diff] [blame] | 18 | |
[email protected] | 01d0ea2 | 2012-03-02 16:51:45 | [diff] [blame] | 19 | class HostEventLogger { |
[email protected] | 5fef892 | 2012-01-13 22:38:24 | [diff] [blame] | 20 | public: |
[email protected] | 01d0ea2 | 2012-03-02 16:51:45 | [diff] [blame] | 21 | virtual ~HostEventLogger() {} |
[email protected] | 5fef892 | 2012-01-13 22:38:24 | [diff] [blame] | 22 | |
[email protected] | 01d0ea2 | 2012-03-02 16:51:45 | [diff] [blame] | 23 | // Creates an event-logger that monitors host status changes and logs |
24 | // corresponding events to the OS-specific log (syslog/EventLog). | ||||
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 25 | static std::unique_ptr<HostEventLogger> Create( |
[email protected] | 9cfb0c3 | 2013-03-02 04:27:49 | [diff] [blame] | 26 | base::WeakPtr<HostStatusMonitor> monitor, |
27 | const std::string& application_name); | ||||
[email protected] | 01d0ea2 | 2012-03-02 16:51:45 | [diff] [blame] | 28 | |
29 | protected: | ||||
30 | HostEventLogger() {} | ||||
[email protected] | 8144871 | 2012-01-17 20:30:11 | [diff] [blame] | 31 | |
32 | private: | ||||
[email protected] | 8144871 | 2012-01-17 20:30:11 | [diff] [blame] | 33 | DISALLOW_COPY_AND_ASSIGN(HostEventLogger); |
[email protected] | 5fef892 | 2012-01-13 22:38:24 | [diff] [blame] | 34 | }; |
35 | |||||
36 | } | ||||
37 | |||||
38 | #endif // REMOTING_HOST_HOST_EVENT_LOGGER_H_ |