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

Unified Diff: remoting/webapp/wcs_loader.js

Issue 10207028: Fixed callWithToken error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer feedback. Created 8 years, 8 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/wcs.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/wcs_loader.js
diff --git a/remoting/webapp/wcs_loader.js b/remoting/webapp/wcs_loader.js
index 54fd3cc2704bf0c382307f4d10415068f2c1304a..fdd37365ae13eb91f6b1a5f216548675431537e6 100644
--- a/remoting/webapp/wcs_loader.js
+++ b/remoting/webapp/wcs_loader.js
@@ -41,9 +41,14 @@ remoting.WcsLoader.load = function(onReady) {
if (!remoting.wcsLoader) {
remoting.wcsLoader = new remoting.WcsLoader();
}
- /** @param {string} token The OAuth2 access token. */
+ /** @param {string?} token The OAuth2 access token. */
var start = function(token) {
- remoting.wcsLoader.start_(token, onReady);
+ if (token) {
+ remoting.wcsLoader.start_(token, onReady);
+ } else {
+ console.error('WcsLoader: Authentication failed.');
+ onReady(null);
+ }
};
remoting.oauth2.callWithToken(start);
};
« no previous file with comments | « remoting/webapp/wcs.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698