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

Side by Side Diff: remoting/webapp/crd/js/session_connector_impl.js

Issue 963103004: Remove getCached* methods from remoting.Identity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and jscompile fixes. Created 5 years, 9 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
« no previous file with comments | « remoting/webapp/crd/js/oauth2.js ('k') | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 * Connect set-up state machine for Me2Me and IT2Me 7 * Connect set-up state machine for Me2Me and IT2Me
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 new remoting.SmartReconnector(this, this.clientSession_); 476 new remoting.SmartReconnector(this, this.clientSession_);
477 } 477 }
478 this.onConnected_(this.clientSession_); 478 this.onConnected_(this.clientSession_);
479 break; 479 break;
480 480
481 case remoting.ClientSession.State.CREATED: 481 case remoting.ClientSession.State.CREATED:
482 console.log('Created plugin'); 482 console.log('Created plugin');
483 break; 483 break;
484 484
485 case remoting.ClientSession.State.CONNECTING: 485 case remoting.ClientSession.State.CONNECTING:
486 console.log('Connecting as ' + remoting.identity.getCachedEmail()); 486 remoting.identity.getEmail().then(
487 function(/** string */ email) {
488 console.log('Connecting as ' + email);
489 });
487 break; 490 break;
488 491
489 case remoting.ClientSession.State.INITIALIZING: 492 case remoting.ClientSession.State.INITIALIZING:
490 console.log('Initializing connection'); 493 console.log('Initializing connection');
491 break; 494 break;
492 495
493 case remoting.ClientSession.State.CLOSED: 496 case remoting.ClientSession.State.CLOSED:
494 // This class deregisters for state-change callbacks when the CONNECTED 497 // This class deregisters for state-change callbacks when the CONNECTED
495 // state is reached, so it only sees the CLOSED state in exceptional 498 // state is reached, so it only sees the CLOSED state in exceptional
496 // circumstances. For example, a CONNECTING -> CLOSED transition happens 499 // circumstances. For example, a CONNECTING -> CLOSED transition happens
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 */ 577 */
575 remoting.DefaultSessionConnectorFactory.prototype.createConnector = 578 remoting.DefaultSessionConnectorFactory.prototype.createConnector =
576 function(clientContainer, onConnected, onError, onExtensionMessage, 579 function(clientContainer, onConnected, onError, onExtensionMessage,
577 onConnectionFailed, requiredCapabilities, defaultRemapKeys) { 580 onConnectionFailed, requiredCapabilities, defaultRemapKeys) {
578 return new remoting.SessionConnectorImpl(clientContainer, onConnected, 581 return new remoting.SessionConnectorImpl(clientContainer, onConnected,
579 onError, onExtensionMessage, 582 onError, onExtensionMessage,
580 onConnectionFailed, 583 onConnectionFailed,
581 requiredCapabilities, 584 requiredCapabilities,
582 defaultRemapKeys); 585 defaultRemapKeys);
583 }; 586 };
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/oauth2.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698