Chromium Code Reviews| Index: remoting/webapp/crd/js/it2me_connect_flow.js |
| diff --git a/remoting/webapp/crd/js/it2me_connect_flow.js b/remoting/webapp/crd/js/it2me_connect_flow.js |
| index 20f42c2c65701f73323d2795183679a21ab96474..eeef467e922ffbaad405f8eaf25e708016bbe219 100644 |
| --- a/remoting/webapp/crd/js/it2me_connect_flow.js |
| +++ b/remoting/webapp/crd/js/it2me_connect_flow.js |
| @@ -88,20 +88,17 @@ remoting.It2MeConnectFlow.prototype.verifyAccessCode_ = function(accessCode) { |
| * Continues an IT2Me connection once an access token has been obtained. |
| * |
| * @param {string} token An OAuth2 access token. |
| - * @return {Promise<XMLHttpRequest>} |
| + * @return {Promise<remoting.Xhr.Response>} |
| * @private |
| */ |
| remoting.It2MeConnectFlow.prototype.getHostInfo_ = function(token) { |
| var that = this; |
| - return new Promise(function(resolve) { |
| - remoting.xhr.start({ |
| - method: 'GET', |
| - url: remoting.settings.DIRECTORY_API_BASE_URL + '/support-hosts/' + |
| - encodeURIComponent(that.hostId_), |
| - onDone: resolve, |
| - oauthToken: token |
| - }); |
| - }); |
| + new remoting.Xhr({ |
|
Jamie
2015/03/16 18:06:34
Don't you need to return this?
John Williams
2015/03/16 23:15:00
Sure, if I was actually calling this method :-) P
John Williams
2015/03/16 23:16:22
Hey, wait, I removed this when I realized this was
|
| + method: 'GET', |
| + url: remoting.settings.DIRECTORY_API_BASE_URL + '/support-hosts/' + |
| + encodeURIComponent(that.hostId_), |
| + oauthToken: token |
| + }).start(); |
| }; |
| /** |