diff options
author | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-09 16:45:16 +0000 |
---|---|---|
committer | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-09 16:45:16 +0000 |
commit | 4ccf21a08bdcf8fc040209b85da91be67900fabf (patch) | |
tree | bdae5ef41bb3ba4cc61ecba4c1d2278f041dd556 | |
parent | dae5717306e82ff5ac20c11f7b31ac8cc8af9d6d (diff) | |
download | chromium_src-4ccf21a08bdcf8fc040209b85da91be67900fabf.zip chromium_src-4ccf21a08bdcf8fc040209b85da91be67900fabf.tar.gz chromium_src-4ccf21a08bdcf8fc040209b85da91be67900fabf.tar.bz2 |
[Chromoting] Clear all localStorage when the user signs out.
BUG=122091
Review URL: https://chromiumcodereview.appspot.com/10022001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131371 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | remoting/webapp/event_handlers.js | 2 | ||||
-rw-r--r-- | remoting/webapp/main.html | 2 | ||||
-rw-r--r-- | remoting/webapp/remoting.js | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/remoting/webapp/event_handlers.js b/remoting/webapp/event_handlers.js index 98b6a1c..778c160 100644 --- a/remoting/webapp/event_handlers.js +++ b/remoting/webapp/event_handlers.js @@ -44,7 +44,7 @@ function onLoad() { }; /** @type {Array.<{event: string, id: string, fn: function(Event):void}>} */ var actions = [ - { event: 'click', id: 'clear-oauth', fn: remoting.clearOAuth2 }, + { event: 'click', id: 'sign-out', fn: remoting.signOut }, { event: 'click', id: 'toolbar-disconnect', fn: remoting.disconnect }, { event: 'click', id: 'send-ctrl-alt-del', fn: remoting.sendCtrlAltDel }, diff --git a/remoting/webapp/main.html b/remoting/webapp/main.html index fc8bff3..252cfdb 100644 --- a/remoting/webapp/main.html +++ b/remoting/webapp/main.html @@ -68,7 +68,7 @@ found in the LICENSE file. <div id="top-secondary"> <span id="current-email"></span> <span data-ui-mode="home"> - <a id="clear-oauth" i18n-content="SIGN_OUT_BUTTON"></a> | + <a id="sign-out" i18n-content="SIGN_OUT_BUTTON"></a> | <!-- TODO(jamiewalch): Add this back in when we support it. <a id="connection-history" i18n-content="CONNECTION_HISTORY_BUTTON"></a> | diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js index b785eca..b2a08fa 100644 --- a/remoting/webapp/remoting.js +++ b/remoting/webapp/remoting.js @@ -155,10 +155,12 @@ remoting.promptClose = function() { /** * Sign the user out of Chromoting by clearing the OAuth refresh token. + * + * Also clear all localStorage, to avoid leaking information. */ -remoting.clearOAuth2 = function() { +remoting.signOut = function() { remoting.oauth2.clear(); - window.localStorage.removeItem(KEY_EMAIL_); + window.localStorage.clear(); remoting.setMode(remoting.AppMode.UNAUTHENTICATED); }; |