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

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
« no previous file with comments | « remoting/webapp/crd/js/host_screen.js ('k') | remoting/webapp/crd/js/it2me_connect_flow.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9065b53c4e1ab665722f27d723af6aaf6896c229 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;
@@ -209,7 +209,7 @@ remoting.HostSetupDialog.prototype.showForStartWithToken_ =
/** @param {!remoting.Error} error */
function onError(error) {
- console.error('Error getting consent status: ' + error);
+ console.error('Error getting consent status: ' + error.toString());
}
this.usageStats_.hidden = true;
« no previous file with comments | « remoting/webapp/crd/js/host_screen.js ('k') | remoting/webapp/crd/js/it2me_connect_flow.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698