| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SERVER_LOG_ENTRY_CLIENT_H_ | 5 #ifndef REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_ |
| 6 #define REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_ | 6 #define REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "remoting/protocol/connection_to_host.h" | 9 #include "remoting/protocol/connection_to_host.h" |
| 10 #include "remoting/protocol/errors.h" | 10 #include "remoting/protocol/errors.h" |
| 11 | 11 |
| 12 namespace remoting { | 12 namespace remoting { |
| 13 | 13 |
| 14 class ServerLogEntry; | 14 class ServerLogEntry; |
| 15 | 15 |
| 16 namespace protocol { | 16 namespace protocol { |
| 17 class PerformanceTracker; | 17 class PerformanceTracker; |
| 18 } // namespace protocol | 18 } // namespace protocol |
| 19 | 19 |
| 20 // Constructs a log entry for a session state change. | 20 // Constructs a log entry for a session state change. |
| 21 scoped_ptr<ServerLogEntry> MakeLogEntryForSessionStateChange( | 21 std::unique_ptr<ServerLogEntry> MakeLogEntryForSessionStateChange( |
| 22 protocol::ConnectionToHost::State state, | 22 protocol::ConnectionToHost::State state, |
| 23 protocol::ErrorCode error); | 23 protocol::ErrorCode error); |
| 24 | 24 |
| 25 // Constructs a log entry for reporting statistics. | 25 // Constructs a log entry for reporting statistics. |
| 26 scoped_ptr<ServerLogEntry> MakeLogEntryForStatistics( | 26 std::unique_ptr<ServerLogEntry> MakeLogEntryForStatistics( |
| 27 protocol::PerformanceTracker* statistics); | 27 protocol::PerformanceTracker* statistics); |
| 28 | 28 |
| 29 // Constructs a log entry for reporting session ID is old. | 29 // Constructs a log entry for reporting session ID is old. |
| 30 scoped_ptr<ServerLogEntry> MakeLogEntryForSessionIdOld( | 30 std::unique_ptr<ServerLogEntry> MakeLogEntryForSessionIdOld( |
| 31 const std::string& session_id); | 31 const std::string& session_id); |
| 32 | 32 |
| 33 // Constructs a log entry for reporting session ID is old. | 33 // Constructs a log entry for reporting session ID is old. |
| 34 scoped_ptr<ServerLogEntry> MakeLogEntryForSessionIdNew( | 34 std::unique_ptr<ServerLogEntry> MakeLogEntryForSessionIdNew( |
| 35 const std::string& session_id); | 35 const std::string& session_id); |
| 36 | 36 |
| 37 void AddClientFieldsToLogEntry(ServerLogEntry* entry); | 37 void AddClientFieldsToLogEntry(ServerLogEntry* entry); |
| 38 void AddSessionIdToLogEntry(ServerLogEntry* entry, const std::string& id); | 38 void AddSessionIdToLogEntry(ServerLogEntry* entry, const std::string& id); |
| 39 void AddSessionDurationToLogEntry(ServerLogEntry* entry, | 39 void AddSessionDurationToLogEntry(ServerLogEntry* entry, |
| 40 base::TimeDelta duration); | 40 base::TimeDelta duration); |
| 41 | 41 |
| 42 } // namespace remoting | 42 } // namespace remoting |
| 43 | 43 |
| 44 #endif // REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_ | 44 #endif // REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_ |
| OLD | NEW |