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

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: unit test fix 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
« no previous file with comments | « remoting/webapp/crd/js/host_list_api.js ('k') | remoting/webapp/crd/js/host_list_api_impl.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 005b237fd2d4c915aa68f9b4cef95f305fcabe18..d8cbdd4379e3d19162dbaaffee6f40a3854f3234 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);
« no previous file with comments | « remoting/webapp/crd/js/host_list_api.js ('k') | remoting/webapp/crd/js/host_list_api_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698