Index: remoting/webapp/crd/js/server_log_entry.js |
diff --git a/remoting/webapp/crd/js/server_log_entry.js b/remoting/webapp/crd/js/server_log_entry.js |
index 6a6dd0f4aeda267e18337ea3c31d17b0e5783c18..c4e36f0e443dacdfe83bcbfa9b0ef12759b6eb32 100644 |
--- a/remoting/webapp/crd/js/server_log_entry.js |
+++ b/remoting/webapp/crd/js/server_log_entry.js |
@@ -83,43 +83,6 @@ remoting.ServerLogEntry.getValueForSessionState_ = function(state) { |
/** @private */ |
remoting.ServerLogEntry.KEY_CONNECTION_ERROR_ = 'connection-error'; |
-/** |
- * @private |
- * @param {!remoting.Error} connectionError |
- * @return {string} |
- */ |
-remoting.ServerLogEntry.getValueForError_ = function(connectionError) { |
- // Directory service should be updated if a new string is added here as |
- // otherwise the error code will be ignored (i.e. recorded as 0 instead). |
- switch (connectionError.tag) { |
- case remoting.Error.Tag.NONE: |
- return 'none'; |
- case remoting.Error.Tag.INVALID_ACCESS_CODE: |
- return 'invalid-access-code'; |
- case remoting.Error.Tag.MISSING_PLUGIN: |
- return 'missing_plugin'; |
- case remoting.Error.Tag.AUTHENTICATION_FAILED: |
- return 'authentication-failed'; |
- case remoting.Error.Tag.HOST_IS_OFFLINE: |
- return 'host-is-offline'; |
- case remoting.Error.Tag.INCOMPATIBLE_PROTOCOL: |
- return 'incompatible-protocol'; |
- case remoting.Error.Tag.BAD_PLUGIN_VERSION: |
- return 'bad-plugin-version'; |
- case remoting.Error.Tag.NETWORK_FAILURE: |
- return 'network-failure'; |
- case remoting.Error.Tag.HOST_OVERLOAD: |
- return 'host-overload'; |
- case remoting.Error.Tag.P2P_FAILURE: |
- return 'p2p-failure'; |
- case remoting.Error.Tag.UNEXPECTED: |
- return 'unexpected'; |
- default: |
- return 'unknown-' + connectionError; |
- } |
-}; |
- |
- |
/** @private */ |
remoting.ServerLogEntry.VALUE_EVENT_NAME_CONNECTION_STATISTICS_ = |
"connection-statistics"; |
@@ -231,9 +194,9 @@ remoting.ServerLogEntry.makeClientSessionStateChange = function(state, |
remoting.ServerLogEntry.VALUE_EVENT_NAME_SESSION_STATE_); |
entry.set_(remoting.ServerLogEntry.KEY_SESSION_STATE_, |
remoting.ServerLogEntry.getValueForSessionState_(state)); |
- if (connectionError.tag != remoting.Error.NONE) { |
+ if (!connectionError.isNone()) { |
entry.set_(remoting.ServerLogEntry.KEY_CONNECTION_ERROR_, |
- remoting.ServerLogEntry.getValueForError_(connectionError)); |
+ connectionError.getTagForServerLog()); |
} |
entry.addModeField(mode); |
return entry; |