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

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
« no previous file with comments | « remoting/webapp/crd/js/host_daemon_facade.js ('k') | remoting/webapp/crd/js/it2me_host_facade.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bf5e25c8dbd3a27c7153e4939510ec97280d2018..a4dbe085bf0ef84022aee35ed1f86a5e5e99d44c 100644
--- a/remoting/webapp/crd/js/host_list_api_impl.js
+++ b/remoting/webapp/crd/js/host_list_api_impl.js
@@ -118,15 +118,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);
« no previous file with comments | « remoting/webapp/crd/js/host_daemon_facade.js ('k') | remoting/webapp/crd/js/it2me_host_facade.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698