Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Unified Diff: remoting/webapp/host_controller.js

Issue 10207028: Fixed callWithToken error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
+ }
});
};

Powered by Google App Engine
This is Rietveld 408576698