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

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

Issue 1161813006: Updated handling of GCD devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops--ignore Created 5 years, 6 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 ffc167ad8041958ce0eaed403c0c76cde39e141f..421314e855065e4c08040f9a65af095210fa3de4 100644
--- a/remoting/webapp/crd/js/host_list_api.js
+++ b/remoting/webapp/crd/js/host_list_api.js
@@ -22,14 +22,13 @@ remoting.HostListApi = function() {
* Registers a new host with the host registry service (either the
* Chromoting registry or GCD).
*
- * @param {string} newHostId The ID of the new host to register.
* @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<remoting.HostListApi.RegisterResult>}
*/
remoting.HostListApi.prototype.register = function(
- newHostId, hostName, publicKey, hostClientId) {
+ hostName, publicKey, hostClientId) {
};
/**
@@ -82,8 +81,8 @@ var instance = null;
remoting.HostListApi.getInstance = function() {
if (instance == null) {
instance = remoting.settings.USE_GCD ?
- new remoting.HostListApiGcdImpl() :
- new remoting.HostListApiImpl();
+ new remoting.GcdHostListApi() :
+ new remoting.LegacyHostListApi();
}
return instance;
};
@@ -100,23 +99,27 @@ remoting.HostListApi.setInstance = function(newInstance) {
/**
* Information returned from the registry/GCD server when registering
- * a device. GCD will fill in all three fields; the Chromoting
- * registry will only return an auth code; other fields will be empty.
+ * a device.
*
* The fields are:
*
* authCode: An OAuth2 authorization code that can be exchanged for a
* refresh token.
*
- * email: The email/XMPP address of the robot account associated
- * with this device.
+ * email: The email/XMPP address of the robot account associated with
+ * this device. The Chromoting directory sets this field to the
+ * empty string; GCD returns a real email address.
*
- * gcmId: The ID string assigned to this device by GCD.
+ * hostId: The ID of the newly registered host.
+ *
+ * isLegacy: True for registrations in the legacy directory, false for
+ * registrations in GCD.
*
* @typedef {{
* authCode: string,
* email: string,
- * gcdId: string
+ * hostId: string,
+ * isLegacy: boolean
* }}
*/
-remoting.HostListApi.RegisterResult;
+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