New issue
Advanced search Search tips

Issue 764394 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug
Proj-Servicification

Blocking:
issue 557406
issue 681072



Sign in to add a comment

mash: Shelf pinning broken with --login-manager.

Project Member Reported by msw@chromium.org, Sep 12 2017

Issue description

mash: Shelf doesn't show pinned apps.
(1) On ToT @ #501046, run "chrome --login-manager"
(2) Pin some apps to the shelf and shutdown.
(3) Run "chrome --login-manager --mash"
Expected: Pinned apps appear on shelf as they do in classic ash.
Actual: No pinned apps on the shelf...

Yay, I get to fix this bug again! Regression test needed...

 

Comment 1 by msw@chromium.org, Sep 12 2017

Summary: mash: Shelf pinning broken with --login-manager. (was: mash: Shelf doesn't show pinned apps.)
This breakage seems to be scoped to --login-manager usage.
Also, pinning apps from the app list in --mash with --login-manager is broken.
(the shelf items wind up having no icon nor title and do nothing on clicks...)

Comment 2 by msw@chromium.org, Sep 12 2017

Cc: sa...@chromium.org
Components: Internals>Preferences>Service Platform>Extensions
Labels: Needs-Bisect
Actually, it seems like extensions won't even launch from --mash with --login-manager.
Clicking Files in the app list (w/ --disable-features=EnableFullscreenAppList) does nothing.
(it works just fine with --mash but not using the login manager)

Discovered after I found that ExtensionRegistry::GetExtensionById fails in --mash with --login-manager.
I wonder if this is a profile/prefs issue? Did it used to work?
The ability to bisect would be nice, but I can't as per  issue 764487 ...

Comment 3 by msw@chromium.org, Sep 12 2017

Cc: xiy...@chromium.org

Comment 4 by xiy...@chromium.org, Sep 12 2017

Do we know when ChromeLauncherController::AttachProfile is called after user sign-in?

For classic ash, this seems happening in ChromeLauncherController ctor and from Shell::InitShelf after session state becomes ACTIVE [1]. That is, after user sign-in.

However for mash, ChromeLauncherController is created earlier in ChromeBrowserMainExtraPartsAsh::PostProfileInit [2]. With --login-manager, PostProfileInit is called after sign-in profile is loaded. Hence ChromeLauncherController is attached to the sign-in profile. The problem is that after sign-in, I don't see ChromeLauncherController::AttachProfile gets called to change it to the user profile. 

[1]: https://cs.chromium.org/chromium/src/ash/shell.cc?rcl=d86e751bd876008156d79a977d388b74777216fa&l=1231

[2]: https://cs.chromium.org/chromium/src/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc?rcl=6550b0a9b59558fd2a2190cf7950e3ab897905d8&l=135
Attaching to the signin profile would explain all the symptoms (pinning in classic doesn't affect mash, pinning in mash works if you stay in mash because it's reading the stored signin profile, etc.).

Comment 6 by msw@chromium.org, Sep 12 2017

That's a good lead, I'll take a look tomorrow. Thanks for the insights!
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 14 2017

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

commit 077c49e54a20c8cd198f85c7f36e6bb728edcb24
Author: Mike Wasserman <msw@chromium.org>
Date: Thu Sep 14 17:16:15 2017

mash: Create ChromeLauncherController on session activation, like cash.

Init mash's CLC in ChromeBrowserMainPartsChromeos when the session to becomes active.
(cash: Shell::OnSessionStateChanged calls ChromeShellDelegate::InitializeShelf/ShelfInit)

TODO: Fix mash crash on V1 app launch as a tab ( crbug.com/764960 )
TODO: Move cash ChromeLauncherController init to this same pattern.

Bug:  764394 
Change-Id: I985c32656a0b2bfdaa29fe31e9d5ca8df3fa1326
Reviewed-on: https://chromium-review.googlesource.com/666288
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501976}
[modify] https://crrev.com/077c49e54a20c8cd198f85c7f36e6bb728edcb24/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/077c49e54a20c8cd198f85c7f36e6bb728edcb24/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[modify] https://crrev.com/077c49e54a20c8cd198f85c7f36e6bb728edcb24/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
[modify] https://crrev.com/077c49e54a20c8cd198f85c7f36e6bb728edcb24/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h

Comment 8 by msw@chromium.org, Sep 14 2017

Status: Fixed (was: Assigned)

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

Status: Archived (was: Fixed)

Comment 10 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment