| Index: remoting/webapp/crd/js/host_list.js
|
| diff --git a/remoting/webapp/crd/js/host_list.js b/remoting/webapp/crd/js/host_list.js
|
| index 81180152549a48df6607d5fec12f87b8c42ff9fa..778dd355d82fbe90a40687a20fa4fc977ce8a719 100644
|
| --- a/remoting/webapp/crd/js/host_list.js
|
| +++ b/remoting/webapp/crd/js/host_list.js
|
| @@ -48,7 +48,7 @@ remoting.HostList = function(table, noHosts, errorMsg, errorButton,
|
| /** @private {Array<remoting.Host>} */
|
| this.hosts_ = [];
|
| /** @private {!remoting.Error} */
|
| - this.lastError_ = remoting.Error.NONE;
|
| + this.lastError_ = remoting.Error.none();
|
| /** @private {remoting.LocalHostSection} */
|
| this.localHostSection_ = new remoting.LocalHostSection(
|
| /** @type {HTMLElement} */ (document.querySelector('.daemon-control')),
|
| @@ -157,7 +157,7 @@ remoting.HostList.prototype.refresh = function(onDone) {
|
| * @private
|
| */
|
| remoting.HostList.prototype.onHostListResponse_ = function(onDone, hosts) {
|
| - this.lastError_ = remoting.Error.NONE;
|
| + this.lastError_ = remoting.Error.none();
|
| this.hosts_ = hosts;
|
| this.sortHosts_();
|
| this.save_();
|
| @@ -213,7 +213,7 @@ remoting.HostList.prototype.display = function() {
|
|
|
| if (this.lastError_.isError()) {
|
| l10n.localizeElementFromTag(this.errorMsg_, this.lastError_.tag);
|
| - if (this.lastError_.tag == remoting.Error.Tag.AUTHENTICATION_FAILED) {
|
| + if (this.lastError_.hasTag(remoting.Error.Tag.AUTHENTICATION_FAILED)) {
|
| l10n.localizeElementFromTag(this.errorButton_,
|
| /*i18n-content*/'SIGN_IN_BUTTON');
|
| } else {
|
| @@ -396,7 +396,7 @@ remoting.HostList.prototype.onLocalHostStarted = function(
|
| * @private
|
| */
|
| remoting.HostList.prototype.onErrorClick_ = function() {
|
| - if (this.lastError_.tag == remoting.Error.Tag.AUTHENTICATION_FAILED) {
|
| + if (this.lastError_.hasTag(remoting.Error.Tag.AUTHENTICATION_FAILED)) {
|
| remoting.handleAuthFailureAndRelaunch();
|
| } else {
|
| this.refresh(remoting.updateLocalHostState);
|
|
|