| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_CLIENT_CLIENT_TELEMETRY_LOGGER_H_ | 5 #ifndef REMOTING_CLIENT_CLIENT_TELEMETRY_LOGGER_H_ |
| 6 #define REMOTING_CLIENT_CLIENT_TELEMETRY_LOGGER_H_ | 6 #define REMOTING_CLIENT_CLIENT_TELEMETRY_LOGGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 protocol::ErrorCode state); | 52 protocol::ErrorCode state); |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 struct HostInfo; | 55 struct HostInfo; |
| 56 | 56 |
| 57 void FillEventContext(ChromotingEvent* event) const; | 57 void FillEventContext(ChromotingEvent* event) const; |
| 58 | 58 |
| 59 // Generates a new random session ID. | 59 // Generates a new random session ID. |
| 60 void GenerateSessionId(); | 60 void GenerateSessionId(); |
| 61 | 61 |
| 62 void PrintLogStatistics(protocol::PerformanceTracker* perf_tracker); |
| 63 |
| 62 // If not session ID has been set, simply generates a new one without sending | 64 // If not session ID has been set, simply generates a new one without sending |
| 63 // any logs, otherwise expire the session ID if the maximum duration has been | 65 // any logs, otherwise expire the session ID if the maximum duration has been |
| 64 // exceeded, and sends SessionIdOld and SessionIdNew events describing the | 66 // exceeded, and sends SessionIdOld and SessionIdNew events describing the |
| 65 // change of id. | 67 // change of id. |
| 66 void RefreshSessionIdIfOutdated(); | 68 void RefreshSessionIdIfOutdated(); |
| 67 | 69 |
| 68 ChromotingEvent MakeStatsEvent(protocol::PerformanceTracker* perf_tracker); | 70 ChromotingEvent MakeStatsEvent(protocol::PerformanceTracker* perf_tracker); |
| 69 ChromotingEvent MakeSessionStateChangeEvent( | 71 ChromotingEvent MakeSessionStateChangeEvent( |
| 70 ChromotingEvent::SessionState state, | 72 ChromotingEvent::SessionState state, |
| 71 ChromotingEvent::ConnectionError error); | 73 ChromotingEvent::ConnectionError error); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 88 ChromotingEventLogWriter* log_writer_; | 90 ChromotingEventLogWriter* log_writer_; |
| 89 | 91 |
| 90 base::ThreadChecker thread_checker_; | 92 base::ThreadChecker thread_checker_; |
| 91 | 93 |
| 92 DISALLOW_COPY_AND_ASSIGN(ClientTelemetryLogger); | 94 DISALLOW_COPY_AND_ASSIGN(ClientTelemetryLogger); |
| 93 }; | 95 }; |
| 94 | 96 |
| 95 } // namespace remoting | 97 } // namespace remoting |
| 96 | 98 |
| 97 #endif // REMOTING_CLIENT_CLIENT_TELEMETRY_LOGGER_H_ | 99 #endif // REMOTING_CLIENT_CLIENT_TELEMETRY_LOGGER_H_ |
| OLD | NEW |