diff options
author | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-19 15:42:21 +0000 |
---|---|---|
committer | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-19 15:42:21 +0000 |
commit | a0cb60a984e8295532a4c4a150c1af77df4ef79d (patch) | |
tree | 6b7eaf819af8ec0b35326c05eabc9726c87edb69 /remoting | |
parent | f615edcef193093d8ecdb24fffdb2a8cc47021b5 (diff) | |
download | chromium_src-a0cb60a984e8295532a4c4a150c1af77df4ef79d.zip chromium_src-a0cb60a984e8295532a4c4a150c1af77df4ef79d.tar.gz chromium_src-a0cb60a984e8295532a4c4a150c1af77df4ef79d.tar.bz2 |
[Chromoting] The webapp handles host renaming correctly.
BUG=113763
TEST=Rename a host. Check the hover text for that host. Connect to the host, and check the title of the resulting page.
Review URL: https://chromiumcodereview.appspot.com/9722014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/webapp/host_list.js | 9 | ||||
-rw-r--r-- | remoting/webapp/host_table_entry.js | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/remoting/webapp/host_list.js b/remoting/webapp/host_list.js index 69f49a5..e7d813c 100644 --- a/remoting/webapp/host_list.js +++ b/remoting/webapp/host_list.js @@ -249,6 +249,15 @@ remoting.HostList.prototype.deleteHost_ = function(hostTableEntry) { * @private */ remoting.HostList.prototype.renameHost_ = function(hostTableEntry) { + for (var i = 0; i < this.hosts_.length; ++i) { + if (this.hosts_[i].hostId == hostTableEntry.host.hostId) { + this.hosts_[i].hostName = hostTableEntry.host.hostName; + break; + } + } + window.localStorage.setItem(remoting.HostList.HOSTS_KEY, + JSON.stringify(this.hosts_)); + /** @param {string} token */ var renameHost = function(token) { var headers = { diff --git a/remoting/webapp/host_table_entry.js b/remoting/webapp/host_table_entry.js index 5756fd2..7132fd9 100644 --- a/remoting/webapp/host_table_entry.js +++ b/remoting/webapp/host_table_entry.js @@ -160,6 +160,10 @@ remoting.HostTableEntry.prototype.commitRename_ = function() { if (editBox) { if (this.host.hostName != editBox.value) { this.host.hostName = editBox.value; + if (this.host.status == 'ONLINE') { + this.tableRow.title = chrome.i18n.getMessage( + /*i18n-content*/'TOOLTIP_CONNECT', this.host.hostName); + } this.onRename_(this); } this.removeEditBox_(); |