Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Unified Diff: remoting/webapp/crd/js/server_log_entry.js

Issue 1004513002: Eliminated named constants for instances of remoting.Error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/crd/js/remoting.js ('k') | remoting/webapp/crd/js/session_connector_impl.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3f1cc8b7d9a6a14b0c1ef9436b9f909c6ccf920b 100644
--- a/remoting/webapp/crd/js/server_log_entry.js
+++ b/remoting/webapp/crd/js/server_log_entry.js
@@ -91,7 +91,7 @@ remoting.ServerLogEntry.KEY_CONNECTION_ERROR_ = 'connection-error';
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) {
+ switch (connectionError.getTag()) {
case remoting.Error.Tag.NONE:
return 'none';
case remoting.Error.Tag.INVALID_ACCESS_CODE:
@@ -115,11 +115,10 @@ remoting.ServerLogEntry.getValueForError_ = function(connectionError) {
case remoting.Error.Tag.UNEXPECTED:
return 'unexpected';
default:
- return 'unknown-' + connectionError;
+ return 'unknown-' + connectionError.getTag();
}
};
-
/** @private */
remoting.ServerLogEntry.VALUE_EVENT_NAME_CONNECTION_STATISTICS_ =
"connection-statistics";
@@ -231,7 +230,7 @@ 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));
}
« no previous file with comments | « remoting/webapp/crd/js/remoting.js ('k') | remoting/webapp/crd/js/session_connector_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698