| Index: remoting/webapp/crd/js/session_connector_impl.js
|
| diff --git a/remoting/webapp/crd/js/session_connector_impl.js b/remoting/webapp/crd/js/session_connector_impl.js
|
| index fecad39c3ef14fd11421bc78d165f8ca0596e8fb..f00a2e1b5a5d3f59a85cbd1d899cfa050bf3dbeb 100644
|
| --- a/remoting/webapp/crd/js/session_connector_impl.js
|
| +++ b/remoting/webapp/crd/js/session_connector_impl.js
|
| @@ -347,8 +347,9 @@ remoting.SessionConnectorImpl.prototype.connectIT2Me = function(accessCode) {
|
| this.hostId_ = normalizedAccessCode.substring(0, kSupportIdLen);
|
| this.passPhrase_ = normalizedAccessCode;
|
| this.connectionMode_ = remoting.ClientSession.Mode.IT2ME;
|
| - remoting.identity.callWithToken(this.connectIT2MeWithToken_.bind(this),
|
| - this.onError_);
|
| + remoting.identity.getToken().then(
|
| + this.connectIT2MeWithToken_.bind(this),
|
| + remoting.Error.handler(this.onError_));
|
| };
|
|
|
| /**
|
| @@ -413,8 +414,9 @@ remoting.SessionConnectorImpl.prototype.connectSignaling_ = function() {
|
|
|
| /** @param {string} token */
|
| function connectSignalingWithToken(token) {
|
| - remoting.identity.getUserInfo(
|
| - connectSignalingWithTokenAndUserInfo.bind(null, token), that.onError_);
|
| + remoting.identity.getUserInfo().then(
|
| + connectSignalingWithTokenAndUserInfo.bind(null, token),
|
| + remoting.Error.handler(that.onError_));
|
| }
|
|
|
| /**
|
| @@ -424,19 +426,20 @@ remoting.SessionConnectorImpl.prototype.connectSignaling_ = function() {
|
| * and been granted the userinfo.profile permission.
|
| *
|
| * @param {string} token
|
| - * @param {string} email
|
| - * @param {string} fullName
|
| + * @param {{email: string, name: string}} userInfo
|
| */
|
| - function connectSignalingWithTokenAndUserInfo(token, email, fullName) {
|
| + function connectSignalingWithTokenAndUserInfo(token, userInfo) {
|
| that.signalStrategy_.connect(
|
| - remoting.settings.XMPP_SERVER_FOR_CLIENT, email, token);
|
| + remoting.settings.XMPP_SERVER_FOR_CLIENT, userInfo.email, token);
|
| }
|
|
|
| this.signalStrategy_ = remoting.SignalStrategy.create();
|
| this.signalStrategy_.setStateChangedCallback(
|
| this.onSignalingState_.bind(this));
|
|
|
| - remoting.identity.callWithToken(connectSignalingWithToken, this.onError_);
|
| + remoting.identity.getToken().then(
|
| + connectSignalingWithToken,
|
| + remoting.Error.handler(this.onError_));
|
| };
|
|
|
| /**
|
|
|