Chromium Code Reviews| Index: remoting/client/client_telemetry_logger.h |
| diff --git a/remoting/client/client_telemetry_logger.h b/remoting/client/client_telemetry_logger.h |
| index 3f7445afd621ba98ed3da90e5ba4910daa57421e..fd076d53b4a5ce296329a0a24f641184e2d1bc61 100644 |
| --- a/remoting/client/client_telemetry_logger.h |
| +++ b/remoting/client/client_telemetry_logger.h |
| @@ -22,11 +22,18 @@ namespace remoting { |
| // ClientTelemetryLogger sends client log entries to the telemetry server. |
| // The logger should be run entirely on one single thread. |
| // TODO(yuweih): Implement new features that session_logger.js provides. |
| +// TODO(BUG 680752): Refactor this so that it's bounded to only one session. |
|
Sergey Ulanov
2017/01/13 00:23:17
s/bounded/bound/
Yuwei
2017/01/13 01:51:12
Done.
|
| class ClientTelemetryLogger { |
| public: |
| explicit ClientTelemetryLogger(ChromotingEvent::Mode mode); |
| ~ClientTelemetryLogger(); |
| + // Sets the host info to be posted along with other log data. By default |
| + // no host info will be logged. |
| + void SetHostInfo(const std::string& host_version, |
| + ChromotingEvent::Os host_os, |
| + const std::string& host_os_version); |
| + |
| // Start must be called before posting logs or setting auth token or closure. |
| void Start(std::unique_ptr<UrlRequestFactory> request_factory, |
| const std::string& telemetry_base_url); |
| @@ -65,6 +72,7 @@ class ClientTelemetryLogger { |
| protocol::ErrorCode state); |
| private: |
| + struct HostInfo; |
| void FillEventContext(ChromotingEvent* event) const; |
| @@ -92,6 +100,8 @@ class ClientTelemetryLogger { |
| ChromotingEvent::Mode mode_; |
| + std::unique_ptr<HostInfo> host_info_; |
| + |
| // The log writer that actually sends log to the server. |
| std::unique_ptr<ChromotingEventLogWriter> log_writer_; |