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

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

Issue 8679017: Don't update jabberId when renaming a host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/me2mom/host_list.js
diff --git a/remoting/webapp/me2mom/host_list.js b/remoting/webapp/me2mom/host_list.js
index 8fd59c0cf9a1f66d12e7c437174382b67bda7633..74055489c2ccdbd4a36a943b80a2a30f5866e5c2 100644
--- a/remoting/webapp/me2mom/host_list.js
+++ b/remoting/webapp/me2mom/host_list.js
@@ -122,8 +122,8 @@ remoting.HostList.prototype.setHosts_ = function(hosts) {
/** @type {remoting.Host} */
var host = hosts[i];
// Validate the entry to make sure it has all the fields we expect.
- if (host.hostName && host.hostId && host.status && host.jabberId &&
- host.publicKey) {
+ if (host.hostName && host.hostId && host.status && host.jabberId
+ && host.publicKey) {
Jamie 2011/11/23 21:34:19 nit: This change now looks a little out-of-place.
Sergey Ulanov 2011/11/24 00:15:30 Done.
var onRename = function() { that.renameHost_(host.hostId); }
var onDelete = function() { that.deleteHost_(host.hostId); }
var hostTableEntry = new remoting.HostTableEntry();
@@ -221,7 +221,11 @@ remoting.HostList.prototype.renameHost_ = function(hostId) {
'Authorization': 'OAuth ' + token,
'Content-type' : 'application/json; charset=UTF-8'
};
- var newHostDetails = { data: hostTableEntry.host };
+ var newHostDetails = { data: {
+ hostId: hostTableEntry.host.hostId,
+ hostName: hostTableEntry.host.hostName,
+ publicKey: hostTableEntry.host.publicKey
+ } };
remoting.xhr.put(
'https://www.googleapis.com/chromoting/v1/@me/hosts/' + hostId,
function(xhr) {},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698