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

Unified Diff: remoting/webapp/me2mom/client_screen.js

Issue 8587050: Implement rename and delete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up CSS. Created 9 years, 1 month 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/me2mom/client_screen.js
diff --git a/remoting/webapp/me2mom/client_screen.js b/remoting/webapp/me2mom/client_screen.js
index 3342d95f9674f277a6a0999197bbe56e0203e65e..ed39bb3a249b94a4b9f7e5bddcfc46ec0a6aec48 100644
--- a/remoting/webapp/me2mom/client_screen.js
+++ b/remoting/webapp/me2mom/client_screen.js
@@ -392,15 +392,12 @@ function recenterToolbar_() {
* @return {void} Nothing.
*/
remoting.connectHost = function(hostId) {
- for (var i = 0; i < remoting.hostList.hosts.length; ++i) {
- /** @type {remoting.Host} */
- var host = remoting.hostList.hosts[i];
- if (host.hostId != hostId)
- continue;
-
- remoting.hostJid = host.jabberId;
- remoting.hostPublicKey = host.publicKey;
- document.getElementById('connected-to').innerText = host.hostName;
+ var hostTableEntry = remoting.hostList.getHostForId(hostId);
+ if (hostTableEntry) {
simonmorris 2011/11/17 23:59:48 "if (!hostTableEntry) { return; }" is simpler.
Jamie 2011/11/18 22:54:57 Done.
+ remoting.hostJid = hostTableEntry.host.jabberId;
+ remoting.hostPublicKey = hostTableEntry.host.publicKey;
+ document.getElementById('connected-to').innerText =
+ hostTableEntry.host.hostName;
remoting.debug.log('Connecting to host...');
@@ -415,7 +412,6 @@ remoting.connectHost = function(hostId) {
remoting.oauth2.getAccessToken(),
callWithToken,
remoting.connectHostWithWcs);
- break;
}
}

Powered by Google App Engine
This is Rietveld 408576698