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

Unified Diff: remoting/webapp/crd/js/oauth2.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/mock_signal_strategy.js ('k') | remoting/webapp/crd/js/oauth2_api_impl.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/oauth2.js
diff --git a/remoting/webapp/crd/js/oauth2.js b/remoting/webapp/crd/js/oauth2.js
index 69edafc3af679888d4ce7e00ca651d03775c8915..d91da5df096abbd6508fb6f1a412eaf9e79fe4c7 100644
--- a/remoting/webapp/crd/js/oauth2.js
+++ b/remoting/webapp/crd/js/oauth2.js
@@ -323,7 +323,7 @@ remoting.OAuth2.prototype.doAuthRedirect = function(onDone) {
remoting.OAuth2.prototype.exchangeCodeForToken = function(code, onDone) {
/** @param {!remoting.Error} error */
var onError = function(error) {
- console.error('Unable to exchange code for token: ', error);
+ console.error('Unable to exchange code for token: ' + error.toString());
};
remoting.oauth2Api.exchangeCodeForTokens(
@@ -375,7 +375,7 @@ remoting.OAuth2.prototype.getToken = function() {
resolve(that.getAccessTokenInternal_()['token']);
}
} else {
- reject(remoting.Error.NOT_AUTHENTICATED);
+ reject(new remoting.Error(remoting.Error.Tag.NOT_AUTHENTICATED));
}
});
};
« no previous file with comments | « remoting/webapp/crd/js/mock_signal_strategy.js ('k') | remoting/webapp/crd/js/oauth2_api_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698