diff options
author | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 20:53:45 +0000 |
---|---|---|
committer | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 20:53:45 +0000 |
commit | 5b41cd6e6cda5992948be27072fd0fa9727fd99f (patch) | |
tree | c3bcc3ac8ec3a0200b51b9de4e30cbf0b55012f0 /remoting/webapp/me2mom/oauth2.js | |
parent | 0f9aa2e7195ccff91b69016823835133e3946316 (diff) | |
download | chromium_src-5b41cd6e6cda5992948be27072fd0fa9727fd99f.zip chromium_src-5b41cd6e6cda5992948be27072fd0fa9727fd99f.tar.gz chromium_src-5b41cd6e6cda5992948be27072fd0fa9727fd99f.tar.bz2 |
Improve error handling when trying to connect to host.
BUG=73108
TEST=Connect to a host after disabling network.
Review URL: http://codereview.chromium.org/7388005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp/me2mom/oauth2.js')
-rw-r--r-- | remoting/webapp/me2mom/oauth2.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/remoting/webapp/me2mom/oauth2.js b/remoting/webapp/me2mom/oauth2.js index c7a0c72..503cfec 100644 --- a/remoting/webapp/me2mom/oauth2.js +++ b/remoting/webapp/me2mom/oauth2.js @@ -177,7 +177,8 @@ remoting.OAuth2.prototype.processTokenResponse_ = function(xhr) { * * Will throw if !isAuthenticated(). * - * @param {function(): void} onDone Callback to invoke on completion. + * @param {function(XMLHttpRequest): void} onDone Callback to invoke on + * completion. * @return {void} */ remoting.OAuth2.prototype.refreshAccessToken = function(onDone) { @@ -196,7 +197,7 @@ remoting.OAuth2.prototype.refreshAccessToken = function(onDone) { remoting.xhr.post(this.OAUTH2_TOKEN_ENDPOINT_, function(xhr) { that.processTokenResponse_(xhr); - onDone(); + onDone(xhr); }, parameters); } @@ -221,7 +222,8 @@ remoting.OAuth2.prototype.doAuthRedirect = function() { * Asynchronously exchanges an authorization code for a refresh token. * * @param {string} code The new refresh token. - * @param {function():void} onDone Callback to invoke on completion. + * @param {function(XMLHttpRequest):void} onDone Callback to invoke on + * completion. * @return {void} */ remoting.OAuth2.prototype.exchangeCodeForToken = function(code, onDone) { @@ -237,7 +239,7 @@ remoting.OAuth2.prototype.exchangeCodeForToken = function(code, onDone) { remoting.xhr.post(this.OAUTH2_TOKEN_ENDPOINT_, function(xhr) { that.processTokenResponse_(xhr); - onDone(); + onDone(xhr); }, parameters); } |