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

Unified Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 3437026: Updating user count before unmapping user pod windows. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/existing_user_controller.cc
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index f3235a5a94de92db7287f3bddeaf9c45de6e2237..c45e30ddf7e369f734e64b8e6c5c4541b6381bba 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -356,14 +356,18 @@ void ExistingUserController::RemoveUser(UserController* source) {
UserManager::Get()->RemoveUser(source->user().email());
- // We need to unmap entry windows, the windows will be unmapped in destructor.
controllers_.erase(controllers_.begin() + source->user_index());
- delete source;
EnableTooltipsIfNeeded(controllers_);
+
+ // Update user count before unmapping windows, otherwise window manager won't
+ // be in the right state.
int new_size = static_cast<int>(controllers_.size());
for (int i = 0; i < new_size; ++i)
controllers_[i]->UpdateUserCount(i, new_size);
+
+ // We need to unmap entry windows, the windows will be unmapped in destructor.
+ delete source;
}
void ExistingUserController::SelectUser(int index) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698