| Index: remoting/webapp/crd/js/desktop_remoting.js
|
| diff --git a/remoting/webapp/crd/js/desktop_remoting.js b/remoting/webapp/crd/js/desktop_remoting.js
|
| index a1838d42c8bc4282cd440662a91687c1bd203b27..d643eec92034562fa2d28b2551a206f48daf8fe2 100644
|
| --- a/remoting/webapp/crd/js/desktop_remoting.js
|
| +++ b/remoting/webapp/crd/js/desktop_remoting.js
|
| @@ -239,7 +239,7 @@ remoting.DesktopRemoting.prototype.handleDisconnected = function() {
|
| * Called when the current session's connection has failed.
|
| *
|
| * @param {remoting.SessionConnector} connector
|
| - * @param {remoting.Error} error
|
| + * @param {!remoting.Error} error
|
| * @return {void} Nothing.
|
| */
|
| remoting.DesktopRemoting.prototype.handleConnectionFailed = function(
|
| @@ -259,7 +259,7 @@ remoting.DesktopRemoting.prototype.handleConnectionFailed = function(
|
| that.handleError(error);
|
| };
|
|
|
| - if (error == remoting.Error.HOST_IS_OFFLINE &&
|
| + if (error.tag == remoting.Error.Tag.HOST_IS_OFFLINE &&
|
| that.refreshHostJidIfOffline_) {
|
| that.refreshHostJidIfOffline_ = false;
|
| // The plugin will be re-created when the host finished refreshing
|
| @@ -291,14 +291,14 @@ remoting.DesktopRemoting.prototype.handleExtensionMessage = function(
|
| /**
|
| * Called when an error needs to be displayed to the user.
|
| *
|
| - * @param {remoting.Error} errorTag The error to be localized and displayed.
|
| + * @param {!remoting.Error} error The error to be localized and displayed.
|
| * @return {void} Nothing.
|
| */
|
| -remoting.DesktopRemoting.prototype.handleError = function(errorTag) {
|
| - console.error('Connection failed: ' + errorTag);
|
| +remoting.DesktopRemoting.prototype.handleError = function(error) {
|
| + console.error('Connection failed: %o', error);
|
| remoting.accessCode = '';
|
|
|
| - if (errorTag === remoting.Error.AUTHENTICATION_FAILED) {
|
| + if (error.tag === remoting.Error.Tag.AUTHENTICATION_FAILED) {
|
| remoting.setMode(remoting.AppMode.HOME);
|
| remoting.handleAuthFailureAndRelaunch();
|
| return;
|
| @@ -308,7 +308,7 @@ remoting.DesktopRemoting.prototype.handleError = function(errorTag) {
|
| this.refreshHostJidIfOffline_ = true;
|
|
|
| var errorDiv = document.getElementById('connect-error-message');
|
| - l10n.localizeElementFromTag(errorDiv, /** @type {string} */ (errorTag));
|
| + l10n.localizeElementFromTag(errorDiv, error.tag);
|
|
|
| var mode = remoting.clientSession ? remoting.desktopConnectedView.getMode()
|
| : this.app_.getSessionConnector().getConnectionMode();
|
|
|