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

Unified Diff: chrome/browser/chromeos/login/users/fake_user_manager.cc

Issue 312023002: Sync starting language and input method preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
Index: chrome/browser/chromeos/login/users/fake_user_manager.cc
diff --git a/chrome/browser/chromeos/login/users/fake_user_manager.cc b/chrome/browser/chromeos/login/users/fake_user_manager.cc
index 258c0ca826a8e5dccd27a5671d0bae0df098592a..191c21a2f3ba741660c235b6287ad5d869c6a92b 100644
--- a/chrome/browser/chromeos/login/users/fake_user_manager.cc
+++ b/chrome/browser/chromeos/login/users/fake_user_manager.cc
@@ -83,6 +83,8 @@ void FakeUserManager::UserLoggedIn(const std::string& email,
if ((*it)->username_hash() == username_hash) {
(*it)->set_is_logged_in(true);
logged_in_users_.push_back(*it);
+ (*it)->set_is_active(true);
dzhioev (left Google) 2014/07/23 11:02:20 Same true for these lines. Could you please rebase
michaelpg 2014/07/25 23:49:08 Done and done.
+ active_user_id_ = (*it)->email();
if (!primary_user_)
primary_user_ = *it;
@@ -115,6 +117,13 @@ User* FakeUserManager::GetActiveUser() {
void FakeUserManager::SwitchActiveUser(const std::string& email) {
active_user_id_ = email;
+ if (user_list_.size() && !active_user_id_.empty()) {
+ for (UserList::const_iterator it = user_list_.begin();
+ it != user_list_.end(); ++it) {
+ if ((*it)->email() == active_user_id_)
+ (*it)->set_is_active(true);
dzhioev (left Google) 2014/07/24 20:31:34 Currently active user should be marked as inactive
michaelpg 2014/07/25 23:49:08 Done.
+ }
+ }
}
void FakeUserManager::SaveUserDisplayName(

Powered by Google App Engine
This is Rietveld 408576698