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

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: fixed bad merge 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
« no previous file with comments | « remoting/webapp/crd/js/host_screen.js ('k') | remoting/webapp/crd/js/identity.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a97d708537269f46a6167a07341e6b56200f3aee..072aff6642aee000ae569ddc9310c425e129d61a 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);
« no previous file with comments | « remoting/webapp/crd/js/host_screen.js ('k') | remoting/webapp/crd/js/identity.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698