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

Unified Diff: remoting/webapp/crd/js/host_list_api.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
Index: remoting/webapp/crd/js/host_list_api.js
diff --git a/remoting/webapp/crd/js/host_list_api.js b/remoting/webapp/crd/js/host_list_api.js
index 4e6cd72babb97d6fdfb9bb4cc44e44acf5a6ef04..2dd4b018351fc79f4921ed530aa8af196d9f4f34 100644
--- a/remoting/webapp/crd/js/host_list_api.js
+++ b/remoting/webapp/crd/js/host_list_api.js
@@ -26,7 +26,7 @@ remoting.HostListApi = function() {
* @param {string} hostName The user-visible name of the new host.
* @param {string} publicKey The public half of the host's key pair.
* @param {string} hostClientId The OAuth2 client ID of the host.
- * @return {!Promise<string>} An OAuth2 auth code or the empty string.
+ * @return {!Promise<remoting.HostListApi.RegisterResult>}
*/
remoting.HostListApi.prototype.register = function(
newHostId, hostName, publicKey, hostClientId) {
@@ -87,3 +87,15 @@ remoting.HostListApi.setInstance = function(newInstance) {
};
})();
+
+/**
+ * A pair of an OAuth2 auth code and a robot account email. Depending
+ * on the specifics of the registration process, either could be the
+ * empty string.
+ *
+ * @typedef {{
+ * authCode: string,
+ * email: string
+ * }}
+ */
+remoting.HostListApi.RegisterResult;
« no previous file with comments | « remoting/webapp/crd/js/host_controller_unittest.js ('k') | remoting/webapp/crd/js/host_list_api_gcd_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698