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

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

Issue 1094133003: Added (incomplete) implementation of HostListApi using GCD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcd-client-fix
Patch Set: Removed extranous TODO Created 5 years, 8 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.js
diff --git a/remoting/webapp/crd/js/host_list.js b/remoting/webapp/crd/js/host_list.js
index 1678464b0bcba09cc520dc253a18e0728cd85884..1262cd82c540296c96aba56b8cd9e560a04f3b11 100644
--- a/remoting/webapp/crd/js/host_list.js
+++ b/remoting/webapp/crd/js/host_list.js
@@ -152,7 +152,7 @@ remoting.HostList.prototype.refresh = function(onDone) {
that.lastError_ = error;
onDone(false);
};
- remoting.hostListApi.get().then(function(hosts) {
+ remoting.HostListApi.getInstance().get().then(function(hosts) {
onDone(that.onHostListResponse_(hosts));
}).catch(
remoting.Error.handler(onError)
@@ -306,7 +306,7 @@ remoting.HostList.prototype.deleteHost_ = function(hostTableEntry) {
if (index != -1) {
this.hostTableEntries_.splice(index, 1);
}
- remoting.hostListApi.remove(hostTableEntry.host.hostId).
+ remoting.HostListApi.getInstance().remove(hostTableEntry.host.hostId).
catch(this.onError_);
};
@@ -324,9 +324,10 @@ remoting.HostList.prototype.renameHost = function(hostTableEntry) {
}
this.save_();
- remoting.hostListApi.put(hostTableEntry.host.hostId,
- hostTableEntry.host.hostName,
- hostTableEntry.host.publicKey).
+ var hostListApi = remoting.HostListApi.getInstance();
+ hostListApi.put(hostTableEntry.host.hostId,
+ hostTableEntry.host.hostName,
+ hostTableEntry.host.publicKey).
catch(this.onError_);
};
@@ -348,7 +349,7 @@ remoting.HostList.prototype.unregisterHostById = function(hostId, opt_onDone) {
return;
}
- remoting.hostListApi.remove(hostId).
+ remoting.HostListApi.getInstance().remove(hostId).
then(function() {
that.refresh(function() {
that.display();

Powered by Google App Engine
This is Rietveld 408576698