| 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 #include "remoting/client/server_log_entry_client.h" | 5 #include "remoting/client/server_log_entry_client.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/stringize_macros.h" | 9 #include "base/strings/stringize_macros.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 case protocol::SIGNALING_TIMEOUT: | 81 case protocol::SIGNALING_TIMEOUT: |
| 82 return "network-failure"; | 82 return "network-failure"; |
| 83 case protocol::HOST_OVERLOAD: | 83 case protocol::HOST_OVERLOAD: |
| 84 return "host-overload"; | 84 return "host-overload"; |
| 85 case protocol::MAX_SESSION_LENGTH: | 85 case protocol::MAX_SESSION_LENGTH: |
| 86 return "max-session-length"; | 86 return "max-session-length"; |
| 87 case protocol::HOST_CONFIGURATION_ERROR: | 87 case protocol::HOST_CONFIGURATION_ERROR: |
| 88 return "host-configuration-error"; | 88 return "host-configuration-error"; |
| 89 case protocol::UNKNOWN_ERROR: | 89 case protocol::UNKNOWN_ERROR: |
| 90 return "unknown-error"; | 90 return "unknown-error"; |
| 91 case protocol::INVALID_ACCOUNT: |
| 92 return "invalid-account"; |
| 91 } | 93 } |
| 92 NOTREACHED(); | 94 NOTREACHED(); |
| 93 return nullptr; | 95 return nullptr; |
| 94 } | 96 } |
| 95 | 97 |
| 96 } // namespace | 98 } // namespace |
| 97 | 99 |
| 98 std::unique_ptr<ServerLogEntry> MakeLogEntryForSessionStateChange( | 100 std::unique_ptr<ServerLogEntry> MakeLogEntryForSessionStateChange( |
| 99 ConnectionToHost::State state, | 101 ConnectionToHost::State state, |
| 100 ErrorCode error) { | 102 ErrorCode error) { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 void AddSessionIdToLogEntry(ServerLogEntry* entry, const std::string& id) { | 162 void AddSessionIdToLogEntry(ServerLogEntry* entry, const std::string& id) { |
| 161 entry->Set(kKeySessionId, id); | 163 entry->Set(kKeySessionId, id); |
| 162 } | 164 } |
| 163 | 165 |
| 164 void AddSessionDurationToLogEntry(ServerLogEntry* entry, | 166 void AddSessionDurationToLogEntry(ServerLogEntry* entry, |
| 165 base::TimeDelta duration) { | 167 base::TimeDelta duration) { |
| 166 entry->Set(kKeySessionDuration, base::Int64ToString(duration.InSeconds())); | 168 entry->Set(kKeySessionDuration, base::Int64ToString(duration.InSeconds())); |
| 167 } | 169 } |
| 168 | 170 |
| 169 } // namespace remoting | 171 } // namespace remoting |
| OLD | NEW |