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

Side by Side Diff: remoting/webapp/host_controller.js

Issue 149863002: Don't revoke tokens on logout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/webapp/oauth2.js » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 'use strict'; 5 'use strict';
6 6
7 /** @suppress {duplicate} */ 7 /** @suppress {duplicate} */
8 var remoting = remoting || {}; 8 var remoting = remoting || {};
9 9
10 /** @constructor */ 10 /** @constructor */
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 result['data']['authorizationCode'], 202 result['data']['authorizationCode'],
203 onServiceAccountCredentials.bind( 203 onServiceAccountCredentials.bind(
204 null, hostName, publicKey, privateKey), 204 null, hostName, publicKey, privateKey),
205 onError); 205 onError);
206 } else { 206 } else {
207 // No authorization code returned, use regular user credential flow. 207 // No authorization code returned, use regular user credential flow.
208 that.hostDispatcher_.getPinHash( 208 that.hostDispatcher_.getPinHash(
209 newHostId, hostPin, startHostWithHash.bind( 209 newHostId, hostPin, startHostWithHash.bind(
210 null, hostName, publicKey, privateKey, 210 null, hostName, publicKey, privateKey,
211 remoting.identity.getCachedEmail(), 211 remoting.identity.getCachedEmail(),
212 remoting.oauth2.exportRefreshToken()), 212 remoting.oauth2.getRefreshToken()),
213 onError); 213 onError);
214 } 214 }
215 } else { 215 } else {
216 console.log('Failed to register the host. Status: ' + xhr.status + 216 console.log('Failed to register the host. Status: ' + xhr.status +
217 ' response: ' + xhr.responseText); 217 ' response: ' + xhr.responseText);
218 onError(remoting.Error.REGISTRATION_FAILED); 218 onError(remoting.Error.REGISTRATION_FAILED);
219 } 219 }
220 } 220 }
221 221
222 /** 222 /**
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 * @param {function(remoting.Error):void} onError Error callback. 467 * @param {function(remoting.Error):void} onError Error callback.
468 * @return {void} 468 * @return {void}
469 */ 469 */
470 remoting.HostController.prototype.clearPairedClients = function( 470 remoting.HostController.prototype.clearPairedClients = function(
471 onDone, onError) { 471 onDone, onError) {
472 this.hostDispatcher_.clearPairedClients(onDone, onError); 472 this.hostDispatcher_.clearPairedClients(onDone, onError);
473 }; 473 };
474 474
475 /** @type {remoting.HostController} */ 475 /** @type {remoting.HostController} */
476 remoting.hostController = null; 476 remoting.hostController = null;
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/oauth2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698