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

Unified Diff: remoting/webapp/crd/js/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
Index: remoting/webapp/crd/js/remoting.js
diff --git a/remoting/webapp/crd/js/remoting.js b/remoting/webapp/crd/js/remoting.js
index d160add522b17c99e669f3bfc5b5434e9f16d6e2..ce77499647c61bb90ecaa45808ea37a8028ff8f3 100644
--- a/remoting/webapp/crd/js/remoting.js
+++ b/remoting/webapp/crd/js/remoting.js
@@ -174,14 +174,14 @@ remoting.timestamp = function() {
* Show an error message, optionally including a short-cut for signing in to
* Chromoting again.
*
- * @param {remoting.Error} error
+ * @param {!remoting.Error} error
* @return {void} Nothing.
*/
remoting.showErrorMessage = function(error) {
l10n.localizeElementFromTag(
document.getElementById('token-refresh-error-message'),
- error);
- var auth_failed = (error == remoting.Error.AUTHENTICATION_FAILED);
+ error.tag);
+ var auth_failed = (error.tag == remoting.Error.Tag.AUTHENTICATION_FAILED);
if (auth_failed && base.isAppsV2()) {
remoting.handleAuthFailureAndRelaunch();
} else {

Powered by Google App Engine
This is Rietveld 408576698