Index: remoting/webapp/host_controller.js |
diff --git a/remoting/webapp/host_controller.js b/remoting/webapp/host_controller.js |
index b5850dbd049958928564a45d45b53ab5a3134d85..5b76e0bd8775b1217110fd80ce8e325d6531966d 100644 |
--- a/remoting/webapp/host_controller.js |
+++ b/remoting/webapp/host_controller.js |
@@ -203,9 +203,13 @@ remoting.HostController.prototype.start = function(hostPin, callback) { |
* @param {string} publicKey */ |
function onKeyGenerated(privateKey, publicKey) { |
remoting.oauth2.callWithToken( |
- /** @param {string} oauthToken */ |
+ /** @param {string?} oauthToken */ |
function(oauthToken) { |
- doRegisterHost(privateKey, publicKey, oauthToken); |
+ if (oauthToken) { |
+ doRegisterHost(privateKey, publicKey, oauthToken); |
+ } else { |
+ callback(remoting.HostController.AsyncResult.FAILED); |
Jamie
2012/04/25 01:20:48
We could probably use a more specific error code h
simonmorris
2012/04/25 16:59:41
Maybe a TODO to add a more specific error code?
Jamie
2012/04/25 17:29:09
Done.
|
+ } |
}); |
}; |