New issue
Advanced search Search tips

Issue 810815 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 810093



Sign in to add a comment

User is "deleted" from UserManager while logging in

Project Member Reported by poromov@chromium.org, Feb 9 2018

Issue description

While working on https://crrev.com/c/904527 I noticed that user became deleted from kReportingUsers for a moment while it's logged in.

This happens because in UserManagerBase::RegularUserLoggedIn() it's first removed from the list, then added to the front of the list.

Removing triggers the following code:
UserManagerBase::RemoveRegularOrSupervisedUserFromList() (https://cs.chromium.org/chromium/src/components/user_manager/user_manager_base.cc?l=1019&rcl=cf3e96da896ecf7715f85d5c71283f4ab53db112)
ChromeUserManagerImpl::OnUserRemoved() (https://cs.chromium.org/chromium/src/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc?l=666&rcl=ac6eb20fcb81e18d29a739e5efdca110c5c5e7cf)
ChromeUserManagerImpl::RemoveReportingUser() (https://cs.chromium.org/chromium/src/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc?l=1345&rcl=ac6eb20fcb81e18d29a739e5efdca110c5c5e7cf)

I believe that OnUserRemoved() shouldn't be triggered for the case when it will be added back immediately.
 
Blocking: 810093
Cc: alemate@chromium.org
Labels: OS-Chrome
Owner: poromov@chromium.org
See https://crrev.com/c/911796 for suggested fix.
Components: Services>SignIn
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/38f7af8d3d04ae0b3f1ef88a7f77fb32fd4360d4

commit 38f7af8d3d04ae0b3f1ef88a7f77fb32fd4360d4
Author: Sergey Poromov <poromov@chromium.org>
Date: Mon Feb 12 10:59:05 2018

Do not notify OnUserRemoved() when the user will be added again.

Add |notify| flag in RemoveRegularOrSupervisedUserFromList() so that
it won't call OnUserRemoved() in some cases.
Otherwise, when user is logged in, this function is called for the user
and it's temporary removed from "reporting users" list.

BUG= 810815 
TEST=Trybots.

Change-Id: Ie28c4b700c4762da3c72bb88e6b4e827576fffa7
Reviewed-on: https://chromium-review.googlesource.com/911796
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Sergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536054}
[modify] https://crrev.com/38f7af8d3d04ae0b3f1ef88a7f77fb32fd4360d4/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc
[modify] https://crrev.com/38f7af8d3d04ae0b3f1ef88a7f77fb32fd4360d4/components/user_manager/user_manager_base.cc
[modify] https://crrev.com/38f7af8d3d04ae0b3f1ef88a7f77fb32fd4360d4/components/user_manager/user_manager_base.h

Status: Fixed (was: Assigned)

Sign in to add a comment