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

Unified Diff: remoting/webapp/crd/js/host_setup_dialog.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/host_setup_dialog.js
diff --git a/remoting/webapp/crd/js/host_setup_dialog.js b/remoting/webapp/crd/js/host_setup_dialog.js
index 8fb02de0230276e7b37b48cae4ed1d836a2a21aa..11a2509ddb1f8bc9a8076902b4192cf91c00e9d8 100644
--- a/remoting/webapp/crd/js/host_setup_dialog.js
+++ b/remoting/webapp/crd/js/host_setup_dialog.js
@@ -163,9 +163,9 @@ remoting.HostSetupDialog.prototype.showForStart = function() {
// Although we don't need an access token in order to start the host,
// using callWithToken here ensures consistent error handling in the
// case where the refresh token is invalid.
- remoting.identity.callWithToken(
+ remoting.identity.getToken().then(
that.showForStartWithToken_.bind(that, state),
- remoting.showErrorMessage);
+ remoting.Error.handler(remoting.showErrorMessage));
};
this.hostController_.getLocalHostState(onState);

Powered by Google App Engine
This is Rietveld 408576698