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

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

Issue 1161813006: Updated handling of GCD devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for review; fixed broken host reg. algorithm 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_impl.js
diff --git a/remoting/webapp/crd/js/host_list_api_impl.js b/remoting/webapp/crd/js/host_list_api_impl.js
index edea31893447f7fec57f955d9cbddbd90ec93a37..2a5a19f47ddc71535ed844ba3e84d8ef1f5a4d64 100644
--- a/remoting/webapp/crd/js/host_list_api_impl.js
+++ b/remoting/webapp/crd/js/host_list_api_impl.js
@@ -23,7 +23,8 @@ remoting.HostListApiImpl = function() {
/** @override */
remoting.HostListApiImpl.prototype.register = function(
- newHostId, hostName, publicKey, hostClientId) {
+ hostName, publicKey, hostClientId) {
+ var newHostId = base.generateUuid();
var newHostDetails = { data: {
hostId: newHostId,
hostName: hostName,
@@ -44,7 +45,12 @@ remoting.HostListApiImpl.prototype.register = function(
var result = /** @type {!Object} */ (response.getJson());
var data = base.getObjectAttr(result, 'data');
var authCode = base.getStringAttr(data, 'authorizationCode');
- return { authCode: authCode, email: '', gcdId: '' };
+ return {
+ authCode: authCode,
+ email: '',
+ hostId: newHostId,
+ isLegacy: true
+ };
} else {
console.log(
'Failed to register the host. Status: ' + response.status +

Powered by Google App Engine
This is Rietveld 408576698