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

Unified Diff: remoting/webapp/base/js/auth_init.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: Smaller diff. Created 5 years, 10 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/base/js/auth_init.js
diff --git a/remoting/webapp/base/js/auth_init.js b/remoting/webapp/base/js/auth_init.js
index c67e454143a62a48befa3f45afd8c475fbe29f5d..0d2fc956ee9778f05897897f056da0c30c63f376 100644
--- a/remoting/webapp/base/js/auth_init.js
+++ b/remoting/webapp/base/js/auth_init.js
@@ -16,11 +16,11 @@ var remoting = remoting || {};
*/
remoting.initIdentity = function(onUserInfoAvailable) {
- /** @param {remoting.Error} error */
+ /** @param {!remoting.Error} error */
function onGetIdentityInfoError(error) {
// No need to show the error message for NOT_AUTHENTICATED
// because we will show "auth-dialog".
- if (error != remoting.Error.NOT_AUTHENTICATED) {
+ if (error.tag != remoting.Error.Tag.NOT_AUTHENTICATED) {
remoting.showErrorMessage(error);
}
}
@@ -46,7 +46,7 @@ remoting.initIdentity = function(onUserInfoAvailable) {
onUserInfoAvailable(userInfo.email, userInfo.name);
}).catch(function(error) {
onGetIdentityInfoError(
- /** @type {remoting.Error} */ (error));
+ /** @type {!remoting.Error} */ (error));
});
};
@@ -64,4 +64,4 @@ remoting.handleAuthFailureAndRelaunch = function() {
window.location.reload();
}
});
-};
+};

Powered by Google App Engine
This is Rietveld 408576698