Index: remoting/webapp/crd/js/client_session.js |
diff --git a/remoting/webapp/crd/js/client_session.js b/remoting/webapp/crd/js/client_session.js |
index 4f4b8e39a23020cf5cf4f25d08d7f0046e562719..b7519b278c10af3de358798abfff3238880633b9 100644 |
--- a/remoting/webapp/crd/js/client_session.js |
+++ b/remoting/webapp/crd/js/client_session.js |
@@ -46,7 +46,7 @@ remoting.ClientSession = function(plugin, host, signalStrategy, mode) { |
this.state_ = remoting.ClientSession.State.CREATED; |
/** @private {!remoting.Error} */ |
- this.error_ = remoting.Error.NONE; |
+ this.error_ = remoting.Error.none(); |
/** @private */ |
this.host_ = host; |
@@ -255,7 +255,7 @@ remoting.ClientSession.prototype.removePlugin = function() { |
* dispose() to remove and destroy the <embed> element. |
* |
* @param {!remoting.Error} error The reason for the disconnection. Use |
- * remoting.Error.NONE if there is no error. |
+ * remoting.Error.none() if there is no error. |
* @return {void} Nothing. |
*/ |
remoting.ClientSession.prototype.disconnect = function(error) { |
@@ -395,22 +395,27 @@ remoting.ClientSession.prototype.onConnectionStatusUpdate = |
} else if (status == remoting.ClientSession.State.FAILED) { |
switch (error) { |
case remoting.ClientSession.ConnectionError.HOST_IS_OFFLINE: |
- this.error_ = remoting.Error.HOST_IS_OFFLINE; |
+ this.error_ = new remoting.Error( |
+ remoting.Error.Tag.HOST_IS_OFFLINE); |
break; |
case remoting.ClientSession.ConnectionError.SESSION_REJECTED: |
- this.error_ = remoting.Error.INVALID_ACCESS_CODE; |
+ this.error_ = new remoting.Error( |
+ remoting.Error.Tag.INVALID_ACCESS_CODE); |
break; |
case remoting.ClientSession.ConnectionError.INCOMPATIBLE_PROTOCOL: |
- this.error_ = remoting.Error.INCOMPATIBLE_PROTOCOL; |
+ this.error_ = new remoting.Error( |
+ remoting.Error.Tag.INCOMPATIBLE_PROTOCOL); |
break; |
case remoting.ClientSession.ConnectionError.NETWORK_FAILURE: |
- this.error_ = remoting.Error.P2P_FAILURE; |
+ this.error_ = new remoting.Error( |
+ remoting.Error.Tag.P2P_FAILURE); |
break; |
case remoting.ClientSession.ConnectionError.HOST_OVERLOAD: |
- this.error_ = remoting.Error.HOST_OVERLOAD; |
+ this.error_ = new remoting.Error( |
+ remoting.Error.Tag.HOST_OVERLOAD); |
break; |
default: |
- this.error_ = remoting.Error.UNEXPECTED; |
+ this.error_ = remoting.Error.unexpected(); |
} |
} |
this.setState_(status); |