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

Unified Diff: remoting/webapp/crd/js/host_list_api.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_list_api.js
diff --git a/remoting/webapp/crd/js/host_list_api.js b/remoting/webapp/crd/js/host_list_api.js
index 421314e855065e4c08040f9a65af095210fa3de4..65d08b66e21822530494f30d49096ccfe2e7bd7c 100644
--- a/remoting/webapp/crd/js/host_list_api.js
+++ b/remoting/webapp/crd/js/host_list_api.js
@@ -71,6 +71,15 @@ remoting.HostListApi.prototype.getSupportHost = function(supportId) {
};
/**
+ * Get the host ID from the contents of a host config file.
+ *
+ * @param {!Object} config
+ * @return {string}
+ */
+remoting.HostListApi.prototype.getHostIdFromConfig = function(config) {
+};
+
+/**
* @private {remoting.HostListApi}
*/
var instance = null;
@@ -80,9 +89,13 @@ var instance = null;
*/
remoting.HostListApi.getInstance = function() {
if (instance == null) {
- instance = remoting.settings.USE_GCD ?
- new remoting.GcdHostListApi() :
- new remoting.LegacyHostListApi();
+ if (remoting.settings.USE_GCD) {
+ var gcdInstance = new remoting.GcdHostListApi();
+ var legacyInstance = new remoting.LegacyHostListApi();
+ instance = new remoting.CombinedHostListApi(legacyInstance, gcdInstance);
+ } else {
+ instance = new remoting.LegacyHostListApi();
+ }
}
return instance;
};

Powered by Google App Engine
This is Rietveld 408576698