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

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: yet another rewrite of host merging logic Created 5 years, 5 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 9387fb0611df8a94c5878cbcede1ffdc890b13ef..00ac4a24b067a4d9e1b59d3d2f38b81fab64505c 100644
--- a/remoting/webapp/crd/js/host_list_api.js
+++ b/remoting/webapp/crd/js/host_list_api.js
@@ -80,9 +80,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