| Index: remoting/webapp/base/js/application.js
|
| diff --git a/remoting/webapp/base/js/application.js b/remoting/webapp/base/js/application.js
|
| index f33f2eeb71cfbe09156d36438ae21108def7a658..40ee35fdb03490457e7cd8983ee1332972778b70 100644
|
| --- a/remoting/webapp/base/js/application.js
|
| +++ b/remoting/webapp/base/js/application.js
|
| @@ -94,7 +94,7 @@ remoting.Application.prototype.start = function() {
|
| this.delegate_.start.bind(this.delegate_, this.getSessionConnector())
|
| ).catch(remoting.Error.handler(
|
| function(/** !remoting.Error */ error) {
|
| - if (error == remoting.Error.CANCELLED) {
|
| + if (error.hasTag(remoting.Error.Tag.CANCELLED)) {
|
| that.exit();
|
| } else {
|
| that.delegate_.signInFailed(error);
|
| @@ -115,7 +115,7 @@ remoting.Application.prototype.exit = function() {
|
| /** Disconnect the remoting client. */
|
| remoting.Application.prototype.disconnect = function() {
|
| if (remoting.clientSession) {
|
| - remoting.clientSession.disconnect(remoting.Error.NONE);
|
| + remoting.clientSession.disconnect(remoting.Error.none());
|
| console.log('Disconnected.');
|
| }
|
| };
|
| @@ -236,7 +236,7 @@ remoting.Application.prototype.onClientStateChange_ = function(state) {
|
| var error = remoting.clientSession.getError();
|
| console.error('Client plugin reported connection failed: ' + error);
|
| if (error === null) {
|
| - error = remoting.Error.UNEXPECTED;
|
| + error = remoting.Error.unexpected();
|
| }
|
| this.onError(error);
|
| break;
|
| @@ -245,7 +245,7 @@ remoting.Application.prototype.onClientStateChange_ = function(state) {
|
| console.error('Unexpected client plugin state: ' + state.current);
|
| // This should only happen if the web-app and client plugin get out of
|
| // sync, so MISSING_PLUGIN is a suitable error.
|
| - this.onError(remoting.Error.MISSING_PLUGIN);
|
| + this.onError(new remoting.Error(remoting.Error.Tag.MISSING_PLUGIN));
|
| break;
|
| }
|
|
|
|
|