diff options
author | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-28 20:41:38 +0000 |
---|---|---|
committer | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-28 20:41:38 +0000 |
commit | 2622feb82a04f568a6700b629fe3b44426ab9935 (patch) | |
tree | d36f3603c35eb4ce332e543b3e6ea6c07830d497 /chromeos/dbus/fake_session_manager_client.cc | |
parent | 30460cb24c29edf2b39754d4db99608e64ea2096 (diff) | |
download | chromium_src-2622feb82a04f568a6700b629fe3b44426ab9935.zip chromium_src-2622feb82a04f568a6700b629fe3b44426ab9935.tar.gz chromium_src-2622feb82a04f568a6700b629fe3b44426ab9935.tar.bz2 |
[CrOS multi-profiles] Restore user sessions after crash
BUG=180903,238998,230464
TEST=Induce browser crash in multi-profile sessions, observe that all user sessions are restored
TEST=CrashRestoreSimpleTest, CrashRestoreComplexTest
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/15929005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202647 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/fake_session_manager_client.cc')
-rw-r--r-- | chromeos/dbus/fake_session_manager_client.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chromeos/dbus/fake_session_manager_client.cc b/chromeos/dbus/fake_session_manager_client.cc index e979c00..6e5c162 100644 --- a/chromeos/dbus/fake_session_manager_client.cc +++ b/chromeos/dbus/fake_session_manager_client.cc @@ -8,6 +8,7 @@ #include "base/location.h" #include "base/message_loop.h" #include "base/string_util.h" +#include "chromeos/dbus/cryptohome_client.h" namespace chromeos { @@ -47,6 +48,10 @@ void FakeSessionManagerClient::RestartEntd() { } void FakeSessionManagerClient::StartSession(const std::string& user_email) { + DCHECK_EQ(0UL, user_sessions_.count(user_email)); + std::string user_id_hash = + CryptohomeClient::GetStubSanitizedUsername(user_email); + user_sessions_[user_email] = user_id_hash; } void FakeSessionManagerClient::StopSession() { @@ -71,10 +76,9 @@ void FakeSessionManagerClient::NotifyLockScreenDismissed() { void FakeSessionManagerClient::RetrieveActiveSessions( const ActiveSessionsCallback& callback) { - ActiveSessionsMap sessions; MessageLoop::current()->PostTask(FROM_HERE, base::Bind(callback, - sessions, + user_sessions_, true)); } |