New issue
Advanced search Search tips

Issue 648964 link

Starred by 8 users

Issue metadata

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


Sign in to add a comment

Login UI - Needs Alternative SessionStateDelegate

Project Member Reported by jonr...@chromium.org, Sep 21 2016

Issue description

Currently SessionStateDelegateChromeos is a direct child of ash::SessionStateDelegate. It's initialization is triggered by the ash::Shell instance, which is not available when running in mash.

We'll need an alternative creation in order to communicate the sessions state between login and the status area.
 
Some of the functionality has been refactored into //chromeos/login and //components/login

Unfortunately, one process will need to own all the login state, and I suspect that will need to be the browser process for now.

Long term it would be nice if the ash process handled login state, so we could login without chrome. Factoring more code into the above directories might help.

Comment 2 by xiy...@chromium.org, Sep 21 2016

Labels: OS-Chrome
Owner: xiy...@chromium.org
Status: Assigned (was: Available)
Agree. We should move login/session state out of chrome. Ash sounds like a good candidate for the new host. Or maybe a new mojo service of session_manager?
I'm guessing the chrome browser process should own login state, at least for now.

Regarding SessionStateDelegateChromeos, there are a couple of options. One is to introduce a SessionStateDelegateMus into //ash/mus and use mojo IPC to talk to chrome to get the data it wants. That may be hard, since it has a bunch of synchronous getters.

SystemTrayDelegateMus / SystemTrayClient is a recent example of the above approach, although it doesn't have any tricky getters right now.

Another option might be to create something new in ash that listens for login state changes and caches the data in the ash process, kinda like how SystemTrayDelegateMus caches the 12 vs. 24 hour clock setting.

Ideally there would be some kind of component-ized login state mojo service, and chrome would push login state changes into it and ash could read them, regardless of where it lives. Everything would be in the same process in classic ash and the service could live either in browser or in ash for mustash, whichever is easier to implement. However, I don't know how to create a service like this (sometimes in-process, sometimes not). I think it's possible, I've just never done it.

(I'm hoping to find a way to avoid having separate FooDelegateChromeos and FooDelegateMus implementations everywhere.)

Labels: Proj-Mustash
Components: Internals>MUS
 Issue 647416  has been merged into this issue.

Comment 7 by xiy...@chromium.org, Oct 14 2016

The plan is to create mojo interfaces between chrome and ash to replace SessionStateDelegate:
- Ash exposes an interface (SessionStateController) for chrome to set session info (session state, login status etc) and cache it for the synchronous getters. Getter methods of SessionStateDelegate goes into this interface. It would also takes care of the SessionStateObservers.
- Chrome implements an interface (SessionManager) for ash to request session state changes such as LockScreen, SwitchActiveUser etc.

This leaves ShouldShowAvatar/GetAvatarImageForWindow in SessionStateDelegate. The two depend on the mapping info of aura::Window and user stored in chrome. And we probably don't want to move the info into ash. Need more thinking on this.

Before moving with the plan, I would like to first consolidate the session/login related getters and observers into SessionStateDelegate/Observer.

Roughly, I will go with the following changes:
- Move SessionState from SessionStateDelegate into an enum class in session_types.h;
- Make SessionStateDelegate to keep track of user sessions and user info instead of
  getting them from chrome;
- Move ash::LoginStatus into session_types.h and relevant code to SessionStateDelegate;
- Move OnLoginStateChanged, OnLoginUserProfilePrepared, OnAppTerminating, OnLockStateChanged
  from Shell/ShellObserver to SessionStateDelegate/Observer;
- Move GetUserLoginStatus etc from SystemTrayDelegate into SessionStateDelegate;
- Replace SessionStateDelegate with mojo interfaces (except for the two Avartar window
  methods);
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 18 2016

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

commit ba4b204b711dff1d75ed36725aa7c8d4c46e7146
Author: xiyuan <xiyuan@chromium.org>
Date: Tue Oct 18 17:14:10 2016

ash: Use session_manager::SessionState

Replace SessionStateDelegate::SessionState with
session_manager::SessionState to prepare for the mojo
interface replacement of SessionStateDelegate.

BUG= 496761 , 648964 
TEST=All existing tests pass.

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

[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/BUILD.gn
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/DEPS
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/session/session_state_delegate.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/session/session_state_delegate.h
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/session/session_state_observer.h
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/shelf/shelf_layout_manager.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/shelf/shelf_layout_manager.h
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/shelf/shelf_locking_manager.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/shelf/shelf_locking_manager.h
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/shelf/shelf_locking_manager_unittest.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/system/chromeos/palette/palette_tray.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/system/chromeos/palette/palette_tray.h
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/system/overview/overview_button_tray.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/system/overview/overview_button_tray.h
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/test/test_session_state_delegate.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/test/test_session_state_delegate.h
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/common/wm/maximize_mode/maximize_mode_event_handler.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/mus/bridge/wm_shell_mus.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/mus/shell_delegate_mus.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/shell/shell_delegate_impl.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/ash/test/ash_test_base.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/chromeos/login/session/kiosk_auto_launcher_session_manager_delegate.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/chromeos/login/session/restore_after_crash_session_manager_delegate.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/chromeos/login/session/stub_login_session_manager_delegate.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/chromeos/login/session/user_session_manager.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/chromeos/login/session_login_browsertest.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/chromeos/login/ui/user_adding_screen.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/ui/ash/session_state_delegate_chromeos.h
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
[add] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/components/session_manager/BUILD.gn
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/components/session_manager/core/BUILD.gn
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/components/session_manager/core/session_manager.cc
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/components/session_manager/core/session_manager.h
[add] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/components/session_manager/session_manager_types.h
[modify] https://crrev.com/ba4b204b711dff1d75ed36725aa7c8d4c46e7146/components/user_manager/user_manager_base.cc

Comment 9 by xiy...@chromium.org, Oct 18 2016

Blockedon: 657149
How is this coming along?  Some of the stuff I need to do in SystemTrayClient / SystemTrayDelegateChromeos is blocked on having some kind of SessionStateDelegate information in chrome.

I was thinking it might be possible to instantiate a SessionStateDelegateChromeos when running in mash, which would not be owned by WmShell (since there is no WmShell). If we provided a SessionStateDelegateChromeos::Get() method then code in SystemTrayClient / SystemTrayDelegateChromeos could call into it without touching ash WmShell.

Eventually SessionStateDelegateChromeos would become the implementation of a SessionState service (and might be renamed).

What do you guys think?

That SGTM as a way to unblock until the interface is available.
Sorry for the delay. I am still working on the refactoring (too many distractions). :(

The plan in #10 makes sense. That is, the mojo part that runs in Chrome would provide the same functionality of SessionStateDelegate (if not exactly the same interface). We could use a SessionStateDelegateChromeos::Get() for now and replace it later.
Blockedon: 665179
Blocking: 665179
Blockedon: -665179
Blocking: 665997
Is there anything I can help with here? Mechanical refactorings?

I've hit a few things in the SystemTrayDelegate that need to know the session state, most commonly LOGIN_SECONDARY.

Still working on it, think I should be able to get a CL ready in the next couple of days. Too many distractions. :(

For SystemTrayDelegate that depends on session state, do you mind using fake values for now and assign bugs (or add TODO) to me to clean them up later?
Blocking: 654606
Blocking: 666021
OK, I'll keep using fake values in SystemTrayDelegate (I already have the fakes).

I've marked the various bugs as blocked-on this one. It'll probably be easier for me to do the system tray stuff, so I'm leaving the bugs assigned to me.

Thanks!

Cc: jamescook@chromium.org
Project Member

Comment 23 by bugdroid1@chromium.org, Nov 21 2016

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

commit 24eba8859771c02f4df1f7aea4864e67bcdf7536
Author: xiyuan <xiyuan@chromium.org>
Date: Mon Nov 21 17:18:35 2016

ash: Replace SessionStateDelegate::CanAddUserToMultiProfile

- Introduce a AddUserSessionPolicy for possible user adding scenarios;
- Replace CanAddUserToMultiProfile with GetAddUserSessionPolicy and
  update call sites;

This makes it easier for mojo interface replacement because it
only needs to cache a AddUserSessionPolicy enum then.

BUG= 648964 

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

[modify] https://crrev.com/24eba8859771c02f4df1f7aea4864e67bcdf7536/ash/common/session/session_state_delegate.cc
[modify] https://crrev.com/24eba8859771c02f4df1f7aea4864e67bcdf7536/ash/common/session/session_state_delegate.h
[modify] https://crrev.com/24eba8859771c02f4df1f7aea4864e67bcdf7536/ash/common/session/session_types.h
[modify] https://crrev.com/24eba8859771c02f4df1f7aea4864e67bcdf7536/ash/common/system/user/user_view.cc
[modify] https://crrev.com/24eba8859771c02f4df1f7aea4864e67bcdf7536/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
[modify] https://crrev.com/24eba8859771c02f4df1f7aea4864e67bcdf7536/chrome/browser/ui/ash/session_state_delegate_chromeos.h
[modify] https://crrev.com/24eba8859771c02f4df1f7aea4864e67bcdf7536/chrome/browser/ui/ash/session_state_delegate_chromeos_unittest.cc

Blocking: 155573
Blockedon: 670422
Blockedon: 670423
Project Member

Comment 28 by bugdroid1@chromium.org, Dec 9 2016

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

commit 468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602
Author: xiyuan <xiyuan@chromium.org>
Date: Fri Dec 09 01:22:41 2016

ash: Add SessionController/Client mojo interfaces

SessionController serves as an interface to maintain a session info
cache in ash. SessionControllerClient runs on the other side where
session manager code runs (chrome) and update SessionController with
session info. They are targeted to replace SessionStateDelegate to
use in both mash and classic ash.

BUG= 648964 , 496761 

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

[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/BUILD.gn
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/common/mojo_interface_factory.cc
[add] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/common/session/session_controller.cc
[add] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/common/session/session_controller.h
[add] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/common/session/session_controller_unittest.cc
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/common/session/session_state_delegate.h
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/common/wm_shell.cc
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/common/wm_shell.h
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/mus/manifest.json
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/public/interfaces/BUILD.gn
[add] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/public/interfaces/session_controller.mojom
[add] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/public/interfaces/session_controller.typemap
[add] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/public/interfaces/session_controller_traits.h
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/ash/public/interfaces/typemaps.gni
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/chrome/browser/chrome_content_browser_manifest_overlay.json
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/chrome/browser/ui/BUILD.gn
[add] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/chrome/browser/ui/ash/session_controller_client.cc
[add] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/chrome/browser/ui/ash/session_controller_client.h
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/components/session_manager/BUILD.gn
[modify] https://crrev.com/468b45fb766ba4da0e7ef3aaaa2d5a05d5f34602/components/user_manager/BUILD.gn

Project Member

Comment 29 by bugdroid1@chromium.org, Dec 15 2016

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

commit 8cb43c2a16b3341a3940b7919a8b61a4b93f2998
Author: xiyuan <xiyuan@chromium.org>
Date: Thu Dec 15 22:59:18 2016

cros: Fix inconsistent SessionController state for tests

- Do not set ACTIVE state in StartRestoreAfterCrashSession and
  StartStubLoginSession. SessionStarted() call will do that. Setting
  it explicitly breaks tests such as AccessibilityManagerTest that
  has "--login-manager" but goes through StartRestoreAfterCrashSession
  code to initialize;
- CrashRestoreComplexTest should use GetLRULoggedInUsers instead
  of GetLoggedInUsers since it tests the user session order;
- Fix UserManagerBase to cover tests that add a non-existent user;
  - Make sure |logged_in_user_| preserves the order since its index is
    used as fake session id ATM;
  - Fire UserAddedToSession for such users;

BUG= 648964 
TEST=Existing tests.

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

[modify] https://crrev.com/8cb43c2a16b3341a3940b7919a8b61a4b93f2998/chrome/browser/chromeos/login/crash_restore_browsertest.cc
[modify] https://crrev.com/8cb43c2a16b3341a3940b7919a8b61a4b93f2998/chrome/browser/chromeos/login/session/chrome_session_manager.cc
[modify] https://crrev.com/8cb43c2a16b3341a3940b7919a8b61a4b93f2998/components/user_manager/user_manager_base.cc

Project Member

Comment 30 by bugdroid1@chromium.org, Dec 20 2016

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

commit 97cdab276ba8b839254e978a44d8f5ac79f0e322
Author: xiyuan <xiyuan@chromium.org>
Date: Tue Dec 20 00:25:43 2016

cros: Fix CrashRestoreComplexTest failure

CrashRestoreComplexTest restores session for non-existent user.
The first session is created with browser_restart flag set. User
manager currently runs RegularUserLoggedInAsEphemeral for such
situation. This caused the first user not returned in UserManager's
GetUsers call and causes ProfileHelper::GetUserByProfile to return
nullptr. This CL fixes the case by using GetLoggedInUsers instead of
GetUsers in GetUserByProfile. This would not happen in production
where only known users could go through crash-n-restore path though.

BUG= 648964 

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

[modify] https://crrev.com/97cdab276ba8b839254e978a44d8f5ac79f0e322/chrome/browser/chromeos/profiles/profile_helper.cc

Project Member

Comment 31 by bugdroid1@chromium.org, Jan 9 2017

Project Member

Comment 32 by bugdroid1@chromium.org, Jan 12 2017

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

commit 215f82a62a105c92faa42f068a4cfecdb63d46d1
Author: xiyuan <xiyuan@chromium.org>
Date: Thu Jan 12 21:00:35 2017

Add a mojo interface for AccountId

And use it for SessionController interface.

BUG= 648964 

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

[modify] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/ash/common/session/session_controller.cc
[modify] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/ash/common/session/session_controller_unittest.cc
[modify] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/ash/mus/test/wm_test_base.cc
[modify] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/ash/public/interfaces/BUILD.gn
[modify] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/ash/public/interfaces/session_controller.mojom
[modify] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/chrome/browser/ui/ash/session_controller_client.cc
[modify] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/chrome/browser/ui/ash/session_controller_client.h
[modify] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/components/signin/core/account_id/account_id.h
[add] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/components/signin/public/interfaces/BUILD.gn
[add] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/components/signin/public/interfaces/OWNERS
[add] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/components/signin/public/interfaces/account_id.mojom
[add] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/components/signin/public/interfaces/account_id.typemap
[add] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/components/signin/public/interfaces/account_id_traits.h
[modify] https://crrev.com/215f82a62a105c92faa42f068a4cfecdb63d46d1/components/typemaps.gni

Clusterfuzz is reporting crashes due to hitting accelerator keys immediately on startup. See  issue 676843  and  issue 680869 .

The crashes are probably due to inconsistency between ash SessionController::IsActiveUserSessionStarted() and chrome browser SessionStateDelegateChromeOS::IsActiveUserSessionStarted(). In particular, ash AcceleratorController allows keyboard shortcuts that should be blocked at the login screen to be processed before the shelf is created.

This line needs to use SessionController:
https://cs.chromium.org/chromium/src/ash/common/accelerators/accelerator_controller.cc?q=acceleratorcontroller&sq=package:chromium&dr=CSs&l=1142

The correct fix is blocked on xiyuan coming up with a solution to TestSessionStateDelegate. For now I'm going to land a band-aid fix for the latest crash. We can revert my fix after ash SessionStateDelegate is replaced with SessionController.

Project Member

Comment 34 by bugdroid1@chromium.org, Jan 23 2017

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

commit 25ecee8b92b585ea5d0cd5d12618c32588b92299
Author: xiyuan <xiyuan@chromium.org>
Date: Mon Jan 23 23:04:58 2017

cros: Change max users to be a constant

Changing max users to be a constant instead of a dynamic config to
prepare switching from SessionStateDelegate to SessionController.
The current ash code uses the number in SystemTray::CreateItems
during initialization and does not handle dynamic change. In
SessionController case, this happens before initial SessionInfo is
sent to ash. Ash will then use the default value in SessionController
and whatever sent via SessionInfo later is ignored. This CL removes
max_users from mojom::SessionInfo and make it constant.

BUG= 648964 

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

[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/ash/common/session/session_controller.cc
[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/ash/common/session/session_controller.h
[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/ash/common/session/session_controller_unittest.cc
[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/ash/mus/test/wm_test_base.cc
[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/ash/public/interfaces/session_controller.mojom
[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/chrome/browser/ui/ash/session_controller_client.cc
[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/components/session_manager/core/session_manager.cc
[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/components/session_manager/core/session_manager.h
[modify] https://crrev.com/25ecee8b92b585ea5d0cd5d12618c32588b92299/components/session_manager/session_manager_types.h

Blocking: 679450
Project Member

Comment 36 by bugdroid1@chromium.org, Mar 1 2017

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

commit 5d8d3ba12db7577559029d5148e8f8bfe8500f62
Author: xiyuan <xiyuan@chromium.org>
Date: Wed Mar 01 21:34:40 2017

cros: Clean up SessionStateDelegate refs in Chrome

Replace SessionStateDelegate references in Chrome with
available equivalents since it is deprecated.

BUG= 648964 

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

[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/DEPS
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/chromeos/accessibility/accessibility_manager.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/chromeos/accessibility/accessibility_manager.h
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/chromeos/accessibility/magnification_manager.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/chromeos/login/session_login_browsertest.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/memory/tab_manager.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/DEPS
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/chrome_shell_delegate.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos_unittest.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/palette_delegate_chromeos.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/palette_delegate_chromeos.h
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/ash/session_controller_client.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/browser_finder_chromeos_unittest.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/views/frame/browser_frame.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/views/frame/system_menu_model_builder.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/components/user_manager/user_manager.cc
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/components/user_manager/user_manager.h
[modify] https://crrev.com/5d8d3ba12db7577559029d5148e8f8bfe8500f62/components/user_manager/user_manager_base.cc

Project Member

Comment 37 by bugdroid1@chromium.org, Mar 2 2017

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

commit 8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1
Author: xiyuan <xiyuan@chromium.org>
Date: Thu Mar 02 22:44:30 2017

ash: Use enum for SessionController::CycleActiveUser

- Move SessionStateDelegate::CycleUser to session_types.h
  as ash::CycleUserDirection;
- Use enum for SessionController::CycleActiveUser and map it
  to ash::CycleUserDirection;

BUG= 648964 

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

[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/common/accelerators/accelerator_controller.cc
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/common/session/session_controller.cc
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/common/session/session_controller.h
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/common/session/session_state_delegate.h
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/common/test/test_session_state_delegate.cc
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/common/test/test_session_state_delegate.h
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/mus/bridge/wm_shell_mus.cc
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/mus/shell_delegate_mus.cc
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/public/cpp/session_types.h
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/public/interfaces/session_controller.mojom
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/public/interfaces/session_controller.typemap
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/public/interfaces/session_controller_traits.h
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/ash/shell/shell_delegate_impl.cc
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/chrome/browser/ui/ash/session_controller_client.cc
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/chrome/browser/ui/ash/session_controller_client.h
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/chrome/browser/ui/ash/session_state_delegate_chromeos.h
[modify] https://crrev.com/8f48ad0c7eda17f66bbc4a983f0412dc0f103ab1/chrome/browser/ui/ash/session_state_delegate_chromeos_unittest.cc

Project Member

Comment 38 by bugdroid1@chromium.org, Mar 3 2017

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

commit 3a1bc5275b499bc6b4545bba2aa80b2980b6e094
Author: xiyuan <xiyuan@chromium.org>
Date: Fri Mar 03 17:44:01 2017

cros: Convert SessionStateDelegateChromeOS tests

SessionStateDelegate(ChromeOS) is deprecated. Convert existing test
cases for SessionControllerClient.

BUG= 648964 

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

[modify] https://crrev.com/3a1bc5275b499bc6b4545bba2aa80b2980b6e094/chrome/browser/chromeos/profiles/profile_helper.h
[rename] https://crrev.com/3a1bc5275b499bc6b4545bba2aa80b2980b6e094/chrome/browser/ui/ash/session_controller_client_unittest.cc
[modify] https://crrev.com/3a1bc5275b499bc6b4545bba2aa80b2980b6e094/chrome/test/BUILD.gn

Cc: xiy...@chromium.org
 Issue 700107  has been merged into this issue.
Blocking: 701093
Project Member

Comment 41 by bugdroid1@chromium.org, Mar 13 2017

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

commit 063733f75d45987b9db79b3e423603908bb558d0
Author: jamescook <jamescook@chromium.org>
Date: Mon Mar 13 23:27:52 2017

mash: Update LoginStatus with session state updates

In classic ash, chrome calls WmShell::UpdateUserLoginStatus() directly,
which updates the appearance of the system tray menu, status area
notifications icon, etc.

Fix mash so it updates LoginStatus as well so that the system tray menu
works more similarly to classic ash. (For example, it now hides the
notifications icon during oobe, hides the "sign out" item in the system
tray menu at the login screen, etc.)

BUG= 699234 , 648964 
TEST=added to ash_unittests SessionControllerTest

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

[modify] https://crrev.com/063733f75d45987b9db79b3e423603908bb558d0/ash/common/session/session_controller.cc
[modify] https://crrev.com/063733f75d45987b9db79b3e423603908bb558d0/ash/common/session/session_controller.h
[modify] https://crrev.com/063733f75d45987b9db79b3e423603908bb558d0/ash/common/session/session_controller_unittest.cc
[modify] https://crrev.com/063733f75d45987b9db79b3e423603908bb558d0/ash/common/wm_shell.cc
[modify] https://crrev.com/063733f75d45987b9db79b3e423603908bb558d0/ash/mus/system_tray_delegate_mus.cc
[modify] https://crrev.com/063733f75d45987b9db79b3e423603908bb558d0/ash/mus/system_tray_delegate_mus.h
[modify] https://crrev.com/063733f75d45987b9db79b3e423603908bb558d0/ash/shell.h

Blockedon: 701193
Project Member

Comment 43 by bugdroid1@chromium.org, Mar 20 2017

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

commit f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef
Author: xiyuan <xiyuan@chromium.org>
Date: Mon Mar 20 20:28:14 2017

ash: Use SessionController instead of SessionStateDelegate

- Switch SessionStateDelegate callers to SessionController;
- Remove all migrated methods from SessionStateDelegate;
- Update tests;
- Update ash_shell_with_content;
- Changed ScreenLocker to set SessionState::ACTIVE before destroying
  LockWindow so that focus is properly restored after lock;
- Changed UserSessionManager to set SessionState::ACTIVE before
  creating browser window so that the created window receives focus;

BUG= 648964 , 699234 

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

[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/BUILD.gn
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/accelerators/accelerator_controller_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/accelerators/accelerator_filter_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/accelerators/accelerator_interactive_uitest_chromeos.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/accelerators/accelerator_controller.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/session/session_controller.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/session/session_controller.h
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/session/session_controller_unittest.cc
[delete] https://crrev.com/fc7f323f548c926b99fe6ebd15f46a514f0df198/ash/common/session/session_state_delegate.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/session/session_state_delegate.h
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/session/session_state_observer.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/shelf/shelf_layout_manager.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/shelf/shelf_locking_manager.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/shelf/shelf_locking_manager.h
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/shelf/shelf_widget.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/shelf/shelf_window_watcher_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/chromeos/media_security/multi_profile_media_tray_item.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/chromeos/media_security/multi_profile_media_tray_item_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/chromeos/network/tray_vpn.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/chromeos/palette/palette_tray.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/chromeos/settings/tray_settings.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/date/date_default_view.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/overview/overview_button_tray.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/tiles/tiles_default_view.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/tray/system_tray.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/tray/tray_popup_utils.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/user/login_status.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/user/tray_user.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/user/tray_user_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/user/user_card_view.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/user/user_view.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/system/web_notification/web_notification_tray.cc
[add] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/test/test_session_controller_client.cc
[add] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/test/test_session_controller_client.h
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/test/test_session_state_delegate.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/test/test_session_state_delegate.h
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/test/test_system_tray_delegate.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/wallpaper/wallpaper_view.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/wm/container_finder.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/wm/maximize_mode/maximize_mode_event_handler.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/wm/overview/window_selector_controller.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/wm/system_modal_container_layout_manager.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/wm/window_cycle_controller.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/wm/workspace/workspace_layout_manager.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/wm/workspace/workspace_layout_manager_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/common/wm_shell.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/mus/bridge/wm_shell_mus.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/mus/shell_delegate_mus.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/root_window_controller.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/root_window_controller_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/shelf/shelf_layout_manager_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/shell/app_list.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/shell/content/client/shell_browser_main_parts.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/shell/content/client/shell_browser_main_parts.h
[add] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/shell/example_session_controller_client.cc
[add] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/shell/example_session_controller_client.h
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/shell/lock_view.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/shell/shell_delegate_impl.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/shell/window_type_launcher.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/shell_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/system/chromeos/power/power_event_observer.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/system/chromeos/power/power_event_observer_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/system/chromeos/power/tablet_power_button_controller.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/system/chromeos/power/video_activity_notifier.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/system/overview/overview_button_tray_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/test/BUILD.gn
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/test/ash_interactive_ui_test_base.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/test/ash_test_base.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/test/ash_test_base.h
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/test/ash_test_helper.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/test/ash_test_helper.h
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/wm/always_on_top_controller_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/wm/ash_focus_rules_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/wm/event_client_impl.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/wm/lock_state_controller_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/wm/power_button_controller.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ash/wm/window_cycle_controller_unittest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/chrome/browser/chromeos/login/lock/screen_locker.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/chrome/browser/chromeos/login/lock/screen_locker_browsertest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/chrome/browser/chromeos/login/session/user_session_manager.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/chrome/browser/ui/ash/session_state_delegate_chromeos.h
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/chrome/test/base/view_event_test_platform_part_chromeos.cc
[modify] https://crrev.com/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef/ui/aura/mus/window_tree_client.cc

The last piece remained in SessionStateDelegate is ShouldShowAvatar and GetAvatarImageForWindow, used in HeaderView::UpdateAvatarIcon. They are needed because multi-profile is implemented in browser under c/b/ui/ash/multi_user/. For this particular feature, we might be able to add window owner account id as a window property.
Blocking: -701093
Project Member

Comment 46 by bugdroid1@chromium.org, Apr 18 2017

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

commit 341c0454a9e0c39895d2228e25a9fd57f919e16e
Author: jamescook <jamescook@chromium.org>
Date: Tue Apr 18 18:04:18 2017

cros: Use SessionController to enable system tray settings / notifications tray

This eliminates 2 methods from SystemTrayDelegate and makes
the system tray work better in mustash.

* Rename ShouldShowSettings to ShouldEnableSettings, because
the settings gear icon is always visible.
* Cache the booleans from the user flow in ash::mojom::UserSession,
because these are set once per session
* Consolidate the session active/locked/etc. logic in SessionController
* Clean up WebNotificationTray, which uses logged in state and
should-show state inconsistently.

BUG= 648964 , 665997 
TEST=ash_unittests TrayItemTest.*, manual testing of supervised user flow and adding secondary user flow

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

[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/public/interfaces/session_controller.mojom
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/session/session_controller.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/session/session_controller.h
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/system/network/network_state_list_detailed_view.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/system/screen_layout_observer.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/system/tiles/tiles_default_view.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/system/tray/default_system_tray_delegate.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/system/tray/default_system_tray_delegate.h
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/system/tray/system_tray_delegate.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/system/tray/system_tray_delegate.h
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/system/web_notification/web_notification_tray.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/system/web_notification/web_notification_tray.h
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/ash/test/test_session_controller_client.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.h
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/chrome/browser/chromeos/login/user_flow.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/chrome/browser/chromeos/login/user_flow.h
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/chrome/browser/ui/ash/session_controller_client.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
[modify] https://crrev.com/341c0454a9e0c39895d2228e25a9fd57f919e16e/chrome/browser/ui/ash/system_tray_delegate_chromeos.h

Project Member

Comment 47 by bugdroid1@chromium.org, May 31 2017

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

commit 317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5
Author: xiyuan <xiyuan@chromium.org>
Date: Wed May 31 15:02:02 2017

cros: CustomFrameViewAsh avatar icon from a window prop

- Add a kAvatarIconKey window property for avatar icon;
- CustomFrameViewAsh observes the property to update its avatar icon
  in HeaderView;
- MultiUserWindowManagerChromeOS push avatar changes when teleporting
  a window;
- Remove the deprecated SessionStateDelegate;

BUG= 648964 
TEST=MultiUserWindowManagerChromeOSTest.TeleportedWindowAvatarProperty

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

[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/BUILD.gn
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/aura/shell_port_classic.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/aura/shell_port_classic.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/frame/custom_frame_view_ash.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/frame/custom_frame_view_ash.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/frame/custom_frame_view_ash_unittest.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/frame/header_view.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/frame/header_view.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/metrics/user_metrics_recorder.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/mus/bridge/shell_port_mash.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/mus/bridge/shell_port_mash.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/mus/non_client_frame_controller.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/mus/shell_delegate_mus.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/mus/shell_delegate_mus.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/mus/window_manager.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/mus/window_manager.h
[delete] https://crrev.com/ccc6023cc4f97a2994a4aa753a89ad4f32b97a84/ash/session/session_state_delegate.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/shelf/shelf_locking_manager_unittest.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/shell.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/shell.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/shell/shell_delegate_impl.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/shell/shell_delegate_impl.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/shell_delegate.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/shell_port.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/shell_port.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/system/bluetooth/tray_bluetooth.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/system/ime/tray_ime_chromeos.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/system/tray_accessibility.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/test/BUILD.gn
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/test/ash_test_helper.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/test/ash_test_helper.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/test/shell_test_api.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/test/shell_test_api.h
[delete] https://crrev.com/ccc6023cc4f97a2994a4aa753a89ad4f32b97a84/ash/test/test_session_state_delegate.cc
[delete] https://crrev.com/ccc6023cc4f97a2994a4aa753a89ad4f32b97a84/ash/test/test_session_state_delegate.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/test/test_shell_delegate.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/test/test_shell_delegate.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/wm/maximize_mode/maximize_mode_window_manager.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/wm/system_modal_container_layout_manager_unittest.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ash/wm/workspace/workspace_layout_manager_keyboard_unittest.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/chrome/browser/ui/ash/chrome_shell_delegate.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/chrome/browser/ui/ash/chrome_shell_delegate.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
[delete] https://crrev.com/ccc6023cc4f97a2994a4aa753a89ad4f32b97a84/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
[delete] https://crrev.com/ccc6023cc4f97a2994a4aa753a89ad4f32b97a84/chrome/browser/ui/ash/session_state_delegate_chromeos.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/chrome/browser/ui/ash/session_util.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/chrome/browser/ui/ash/session_util.h
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ui/aura/client/aura_constants.cc
[modify] https://crrev.com/317fdbe13422752c4a2ba6eb44027ae3fb2bd1e5/ui/aura/client/aura_constants.h

Status: Fixed (was: Assigned)
SessionStateDelegate is now retired.
Project Member

Comment 49 by bugdroid1@chromium.org, Jul 14 2017

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

commit 5e247c8afe52c895b72a6e6366fbe13a2d82e0b7
Author: James Cook <jamescook@chromium.org>
Date: Fri Jul 14 02:59:33 2017

cros: Remove references to SessionStateDelegate in ash

The delegate no longer exists.

Bug:  648964 
Test: ash_unittests --mash
Change-Id: I1b675bbe830a6e503ced7d1a3453035330dc4354
Reviewed-on: https://chromium-review.googlesource.com/571315
Reviewed-by: Michael Wasserman <msw@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486653}
[modify] https://crrev.com/5e247c8afe52c895b72a6e6366fbe13a2d82e0b7/ash/session/session_controller.h
[modify] https://crrev.com/5e247c8afe52c895b72a6e6366fbe13a2d82e0b7/ash/wm/system_modal_container_layout_manager.cc

Labels: VerifyIn-61

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

Status: Archived (was: Fixed)
Components: -Internals>MUS Internals>Services>WindowService
Components: -MUS

Sign in to add a comment