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

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

Issue 1217643002: Added HostListApl implementation to connect to legacy directory and GCD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcd-e2e
Patch Set: 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_controller.js
diff --git a/remoting/webapp/crd/js/host_controller.js b/remoting/webapp/crd/js/host_controller.js
index 730b8822a4ab02c0fb538b5a7bc7653e630422a5..0512c9272dfb6dd33a98cb56914c7307af2fc7e8 100644
--- a/remoting/webapp/crd/js/host_controller.js
+++ b/remoting/webapp/crd/js/host_controller.js
@@ -357,7 +357,8 @@ remoting.HostController.prototype.updatePin = function(newPin, onDone,
return;
}
/** @type {string} */
- var hostId = config['host_id'];
+ var hostId = remoting.HostListApi.getInstance().getHostIdFromConfig(
+ /** @type {!Object} */ (config));
that.hostDaemonFacade_.getPinHash(hostId, newPin).then(
updateDaemonConfigWithHash, remoting.Error.handler(onError));
}
@@ -397,10 +398,8 @@ remoting.HostController.prototype.getLocalHostId = function(onDone) {
function onConfig(config) {
var hostId = null;
if (isHostConfigValid_(config)) {
- // Use the |gcd_device_id| field if it exists, or the |host_id|
- // field otherwise.
- hostId = base.getStringAttr(
- config, 'gcd_device_id', base.getStringAttr(config, 'host_id'));
+ hostId = remoting.HostListApi.getInstance().getHostIdFromConfig(
+ /** @type {!Object} */ (config));
}
onDone(hostId);
};

Powered by Google App Engine
This is Rietveld 408576698