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

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

Issue 1004513002: Eliminated named constants for instances of remoting.Error. (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
Index: remoting/webapp/crd/js/host_setup_dialog.js
diff --git a/remoting/webapp/crd/js/host_setup_dialog.js b/remoting/webapp/crd/js/host_setup_dialog.js
index dbf844a307f670b8f6a356a5f1e7717239198f39..bfa9430f863f0ebbf0f9aa57f4aa17cbafb9f146 100644
--- a/remoting/webapp/crd/js/host_setup_dialog.js
+++ b/remoting/webapp/crd/js/host_setup_dialog.js
@@ -69,13 +69,13 @@ remoting.HostSetupFlow.prototype.switchToNextStep = function() {
* @param {!remoting.Error} error
*/
remoting.HostSetupFlow.prototype.switchToErrorState = function(error) {
- if (error.tag == remoting.Error.Tag.CANCELLED) {
+ if (error.hasTag(remoting.Error.Tag.CANCELLED)) {
// Stop the setup flow if user rejected one of the actions.
this.state_ = remoting.HostSetupFlow.State.NONE;
} else {
// Current step failed, so switch to corresponding error state.
if (this.state_ == remoting.HostSetupFlow.State.STARTING_HOST) {
- if (error.tag == remoting.Error.Tag.REGISTRATION_FAILED) {
+ if (error.hasTag(remoting.Error.Tag.REGISTRATION_FAILED)) {
this.state_ = remoting.HostSetupFlow.State.REGISTRATION_FAILED;
} else {
this.state_ = remoting.HostSetupFlow.State.START_HOST_FAILED;

Powered by Google App Engine
This is Rietveld 408576698