New issue
Advanced search Search tips

Issue 718458 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: May 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Profile is not ready when SessionObserver::OnActiveUserSessionChanged() is called for the primary user

Project Member Reported by afakhry@chromium.org, May 4 2017

Issue description

While working on this CL: https://codereview.chromium.org/2857103007/
I had to also watch OnSessionStateChanged() and init the settings from the user's pref when the session state is ACTIVE, because only then the profile is ready.

It would be nice if OnActiveUserSessionChanged() is fired only after the primary user's profile is ready.
 
That is inherited from chrome side code. It is not ideal that OnActiveUserSessionChanged fires at different stage for primary (1st) user (no user profile) and secondary users (user profile loaded). I think almost all code expects the user profile is loaded when getting this notification. Having no user profile is a bit unexpected and wait for an additional notification makes code difficult to write.

For short term fix, I will put in a work around for ash to defer primary user's notification until user profile is loaded.

For longer term, I will include this case during the UserManager/SessionManager refactoring and update chrome side code as well.
Project Member

Comment 2 by bugdroid1@chromium.org, May 8 2017

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

commit 4cfa57df48555a9f2f54d2f5cb78a3db29b3b187
Author: xiyuan <xiyuan@chromium.org>
Date: Mon May 08 18:04:56 2017

cros: Defer primary user meta update until active

Defer the meta/order update to ash until session state becomes
active for primary user. So that ash side code could be simplified
to expect having a consistent state for both primary user session
and secondary user sessions.

BUG= 718458 

Review-Url: https://codereview.chromium.org/2863993002
Cr-Commit-Position: refs/heads/master@{#470048}

[modify] https://crrev.com/4cfa57df48555a9f2f54d2f5cb78a3db29b3b187/chrome/browser/ui/ash/session_controller_client.cc
[modify] https://crrev.com/4cfa57df48555a9f2f54d2f5cb78a3db29b3b187/chrome/browser/ui/ash/session_controller_client_unittest.cc

Status: Fixed (was: Assigned)

Comment 4 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 5 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment