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

Unified Diff: remoting/webapp/crd/js/host_list_api_gcd_impl.js

Issue 1111603002: Added ability to register new hosts using GCD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host-list-delete
Patch Set: for review Created 5 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/crd/js/host_list_api_gcd_impl.js
diff --git a/remoting/webapp/crd/js/host_list_api_gcd_impl.js b/remoting/webapp/crd/js/host_list_api_gcd_impl.js
index e29a0d00b84547852ee085d46c1b12b514ad48c4..4e108330c0ca96a168683c6706ca12bafb78eb2f 100644
--- a/remoting/webapp/crd/js/host_list_api_gcd_impl.js
+++ b/remoting/webapp/crd/js/host_list_api_gcd_impl.js
@@ -40,7 +40,7 @@ remoting.HostListApiGcdImpl.prototype.register = function(
}
};
- return /** @type {!Promise<string>} */ (
+ return /** @type {!Promise<remoting.HostListApi.RegisterResult>} */ (
this.gcd_.insertRegistrationTicket().
then(function(ticket) {
return self.gcd_.patchRegistrationTicket(
@@ -50,7 +50,10 @@ remoting.HostListApiGcdImpl.prototype.register = function(
return self.gcd_.finalizeRegistrationTicket(ticket.id);
}).
then(function(/**remoting.gcd.RegistrationTicket*/ ticket) {
- return ticket.robotAccountAuthorizationCode;
+ return {
+ authCode: ticket.robotAccountAuthorizationCode,
+ email: ticket.robotAccountEmail
+ };
}).
catch(function(error) {
console.error('Error registering device with GCD: ' + error);

Powered by Google App Engine
This is Rietveld 408576698