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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Class representing the host-list portion of the home screen UI. 7 * Class representing the host-list portion of the home screen UI.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 if (!hostTableEntry) { 214 if (!hostTableEntry) {
215 console.error('No host registered for id ' + hostId); 215 console.error('No host registered for id ' + hostId);
216 return; 216 return;
217 } 217 }
218 /** @param {string} token */ 218 /** @param {string} token */
219 var renameHost = function(token) { 219 var renameHost = function(token) {
220 var headers = { 220 var headers = {
221 'Authorization': 'OAuth ' + token, 221 'Authorization': 'OAuth ' + token,
222 'Content-type' : 'application/json; charset=UTF-8' 222 'Content-type' : 'application/json; charset=UTF-8'
223 }; 223 };
224 var newHostDetails = { data: hostTableEntry.host }; 224 var newHostDetails = { data: {
225 hostId: hostTableEntry.host.hostId,
226 hostName: hostTableEntry.host.hostName,
227 publicKey: hostTableEntry.host.publicKey
228 } };
225 remoting.xhr.put( 229 remoting.xhr.put(
226 'https://www.googleapis.com/chromoting/v1/@me/hosts/' + hostId, 230 'https://www.googleapis.com/chromoting/v1/@me/hosts/' + hostId,
227 function(xhr) {}, 231 function(xhr) {},
228 JSON.stringify(newHostDetails), 232 JSON.stringify(newHostDetails),
229 headers); 233 headers);
230 } 234 }
231 remoting.oauth2.callWithToken(renameHost); 235 remoting.oauth2.callWithToken(renameHost);
232 }; 236 };
233 237
234 /** 238 /**
235 * Class name for the host list when it is collapsed. 239 * Class name for the host list when it is collapsed.
236 * @private 240 * @private
237 */ 241 */
238 remoting.HostList.COLLAPSED_ = 'collapsed'; 242 remoting.HostList.COLLAPSED_ = 'collapsed';
239 243
240 /** @type {remoting.HostList} */ 244 /** @type {remoting.HostList} */
241 remoting.hostList = null; 245 remoting.hostList = null;
OLDNEW
« 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