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

Unified Diff: chromeos/dbus/fake_session_manager_client.cc

Issue 15929005: [CrOS multi-profiles] Restore user sessions after crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/fake_session_manager_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « chromeos/dbus/fake_session_manager_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698