Chromium Code Reviews| Index: chromeos/dbus/fake_session_manager_client.cc |
| diff --git a/chromeos/dbus/fake_session_manager_client.cc b/chromeos/dbus/fake_session_manager_client.cc |
| index e979c009be7b9577017d2b069846e883832078ba..812ba333c05fa4725f780ebc3300902f3be61bb5 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(user_sessions_.find(user_email) == user_sessions_.end()); |
|
satorux1
2013/05/28 03:39:42
matter of taste: this is a bit shorter:
DCHECK_EQ
Nikita (slow)
2013/05/28 16:51:17
Done.
|
| + 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)); |
| } |