Chromium Code Reviews| 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 c345d6444320779d5b2f807a34b0d22e1e06c9e6..f8bcb551e8f833216739b215a234317c1ec0c64e 100644 |
| --- a/remoting/webapp/crd/js/desktop_remoting.js |
| +++ b/remoting/webapp/crd/js/desktop_remoting.js |
| @@ -266,7 +266,7 @@ remoting.DesktopRemoting.prototype.handleConnectionFailed = function( |
| that.handleError(error); |
| }; |
| - if (error.tag == remoting.Error.Tag.HOST_IS_OFFLINE && |
| + if (error.hasTag(remoting.Error.Tag.HOST_IS_OFFLINE) && |
| that.refreshHostJidIfOffline_) { |
| that.refreshHostJidIfOffline_ = false; |
| // The plugin will be re-created when the host finished refreshing |
| @@ -302,10 +302,10 @@ remoting.DesktopRemoting.prototype.handleExtensionMessage = function( |
| * @return {void} Nothing. |
| */ |
| remoting.DesktopRemoting.prototype.handleError = function(error) { |
| - console.error('Connection failed:', error.tag); |
| + console.error('Connection failed:', error); |
|
Jamie
2015/03/13 17:56:17
This (and below) looks like another change in the
John Williams
2015/03/13 19:30:29
This one was deliberate, since I was trying to min
|
| remoting.accessCode = ''; |
| - if (error.tag === remoting.Error.Tag.AUTHENTICATION_FAILED) { |
| + if (error.hasTag(remoting.Error.Tag.AUTHENTICATION_FAILED)) { |
| remoting.setMode(remoting.AppMode.HOME); |
| remoting.handleAuthFailureAndRelaunch(); |
| return; |
| @@ -315,7 +315,7 @@ remoting.DesktopRemoting.prototype.handleError = function(error) { |
| this.refreshHostJidIfOffline_ = true; |
| var errorDiv = document.getElementById('connect-error-message'); |
| - l10n.localizeElementFromTag(errorDiv, error.tag); |
| + l10n.localizeElementFromTag(errorDiv, error); |
| var mode = remoting.clientSession ? remoting.desktopConnectedView.getMode() |
| : this.app_.getSessionConnector().getConnectionMode(); |