| Index: remoting/webapp/crd/js/crd_event_handlers.js | 
| diff --git a/remoting/webapp/crd/js/crd_event_handlers.js b/remoting/webapp/crd/js/crd_event_handlers.js | 
| index fb96ee0ab3e18293aaf2f7b1dfc04b9b92eba6aa..991c36b4cfd69cb8b5c2e9ebb86cb67c95cdcbc9 100644 | 
| --- a/remoting/webapp/crd/js/crd_event_handlers.js | 
| +++ b/remoting/webapp/crd/js/crd_event_handlers.js | 
| @@ -84,3 +84,18 @@ remoting.initElementEventHandlers = function() { | 
| registerEventListeners(host_actions); | 
| registerEventListeners(auth_actions); | 
| } | 
| + | 
| +/** | 
| + * Sign the user out of Chromoting by clearing (and revoking, if possible) the | 
| + * OAuth refresh token. | 
| + * | 
| + * Also clear all local storage, to avoid leaking information. | 
| + */ | 
| +remoting.signOut = function() { | 
| +  remoting.oauth2.removeCachedAuthToken().then(function(){ | 
| +    chrome.storage.local.clear(); | 
| +    remoting.setMode(remoting.AppMode.HOME); | 
| +    window.location.reload(); | 
| +  }); | 
| +}; | 
| + | 
|  |