Chromium Code Reviews| Index: remoting/webapp/app_remoting/js/feedback_consent.js |
| diff --git a/remoting/webapp/app_remoting/js/feedback_consent.js b/remoting/webapp/app_remoting/js/feedback_consent.js |
| index f79237630c190d6e669de31ffa27090eca7046ad..ca8c2eaa66330cae5f293b12d7448986b2a5ffeb 100644 |
| --- a/remoting/webapp/app_remoting/js/feedback_consent.js |
| +++ b/remoting/webapp/app_remoting/js/feedback_consent.js |
| @@ -127,21 +127,20 @@ function onToken(token) { |
| '/applications/' + remoting.settings.getAppRemotingApplicationId() + |
| '/hosts/' + hostId + |
| '/reportIssue'; |
| - /** @param {XMLHttpRequest} xhr */ |
| - var onDone = function(xhr) { |
| - if (xhr.status >= 200 && xhr.status < 300) { |
| + /** @param {!remoting.Xhr.Response} response */ |
|
Jamie
2015/03/18 22:16:16
Nit: Use the shorter, in-line "/** <type> */" synt
John Williams
2015/03/19 20:19:42
Done.
|
| + var onDone = function(response) { |
| + if (response.status >= 200 && response.status < 300) { |
| getUserInfo(); |
| } else { |
| showError(); |
| } |
| }; |
| - remoting.xhr.start({ |
| + new remoting.Xhr({ |
| method: 'POST', |
| url: uri, |
| - onDone: onDone, |
| jsonContent: body, |
| oauthToken: token |
| - }); |
| + }).start().then(onDone); |
| } else { |
| getUserInfo(); |
| } |