Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: remoting/webapp/crd/js/desktop_remoting.js

Issue 955283002: Converted remoting.Error from an enum to a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/crd/js/crd_connect.js ('k') | remoting/webapp/crd/js/dns_blackhole_checker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..98b62a438d04f32b6c3c7767eb3f0b72250c8629 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
@@ -305,7 +305,7 @@ remoting.DesktopRemoting.prototype.handleError = function(error) {
console.error('Connection failed:', error.tag);
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;
« no previous file with comments | « remoting/webapp/crd/js/crd_connect.js ('k') | remoting/webapp/crd/js/dns_blackhole_checker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698