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

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

Issue 1015553003: Added more typechecking functions and unit tests for existing code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 7f4bd8e189efe6cf1ea46680e0a70dcde3567805..52f9377e58a12aa64aa256b4094b69d3cc5397b7 100644
--- a/remoting/webapp/crd/js/host_list_api_impl.js
+++ b/remoting/webapp/crd/js/host_list_api_impl.js
@@ -115,15 +115,17 @@ remoting.HostListApiImpl.prototype.parseHostListResponse_ =
var hosts = items.map(
function(/** Object */ item) {
var host = new remoting.Host();
- host.hostName = getStringAttr(item, 'hostName', '');
- host.hostId = getStringAttr(item, 'hostId', '');
- host.status = getStringAttr(item, 'status', '');
- host.jabberId = getStringAttr(item, 'jabberId', '');
- host.publicKey = getStringAttr(item, 'publicKey', '');
- host.hostVersion = getStringAttr(item, 'hostVersion', '');
- host.tokenUrlPatterns = getArrayAttr(item, 'tokenUrlPatterns', []);
- host.updatedTime = getStringAttr(item, 'updatedTime', '');
- host.hostOfflineReason = getStringAttr(item, 'hostOfflineReason', '');
+ host.hostName = base.getStringAttr(item, 'hostName', '');
+ host.hostId = base.getStringAttr(item, 'hostId', '');
+ host.status = base.getStringAttr(item, 'status', '');
+ host.jabberId = base.getStringAttr(item, 'jabberId', '');
+ host.publicKey = base.getStringAttr(item, 'publicKey', '');
+ host.hostVersion = base.getStringAttr(item, 'hostVersion', '');
+ host.tokenUrlPatterns =
+ base.getArrayAttr(item, 'tokenUrlPatterns', []);
+ host.updatedTime = base.getStringAttr(item, 'updatedTime', '');
+ host.hostOfflineReason =
+ base.getStringAttr(item, 'hostOfflineReason', '');
return host;
});
onDone(hosts);

Powered by Google App Engine
This is Rietveld 408576698