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

Unified Diff: remoting/webapp/crd/js/wcs_sandbox_container.js

Issue 937593002: Changed identity API to use promises instead of callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/crd/js/wcs_sandbox_container.js
diff --git a/remoting/webapp/crd/js/wcs_sandbox_container.js b/remoting/webapp/crd/js/wcs_sandbox_container.js
index 4104c369b69959f822387f01da7b94579e2d8ecd..4484c760d5c2c339d7f9d8c3d72396d644fd2a33 100644
--- a/remoting/webapp/crd/js/wcs_sandbox_container.js
+++ b/remoting/webapp/crd/js/wcs_sandbox_container.js
@@ -97,8 +97,9 @@ remoting.WcsSandboxContainer.prototype.ensureAccessTokenRefreshTimer_ =
* @return {void} Nothing.
*/
remoting.WcsSandboxContainer.prototype.refreshAccessToken_ = function() {
- remoting.identity.callWithToken(
- this.setAccessToken_.bind(this), this.onError_);
+ remoting.identity.getToken().then(
+ this.setAccessToken_.bind(this),
+ remoting.Error.handler(this.onError_));
};
/**

Powered by Google App Engine
This is Rietveld 408576698