New issue
Advanced search Search tips

Issue 850919 link

Starred by 1 user

Issue metadata

Status: Available
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Multi-profile session restore broken with --no-startup-window

Project Member Reported by grt@chromium.org, Jun 8 2018

Issue description

I've been noticing for some time a few things that I found odd:

- Chrome opens up visible browser windows when I sign into my Win box.
- Chrome often doesn't open up windows for *one* of my profiles when launching this way.

It finally irritated me enough that I debugged into StartupBrowserCreator::ProcessLastOpenedProfiles to see just what's going on.

Here's the scoop: the handling of kNoStartupWindow is in StartupBrowserCreatorImpl::DetermineURLsAndLaunch. It basically says "if we're launching a new browser process and --no-startup-window is specified, don't open any urls at all." That seems okay, except that this is within StartupBrowserCreatorImpl::Launch, which is called once per profile. After the call to StartupBrowserCreator::LaunchBrowser for the first profile, is_process_startup is flipped to IS_NOT_PROCESS_STARTUP. All following profiles, therefore, have their browser windows opened.

It looks to me like is_process_startup conflates two concepts: 1) is this the first launch of a browser process, and 2) is some particular |profile| the first of N that may be opened/restored for this particular launch.

I imagine this is a problem on all desktop platforms.

I think the correct behavior is for no windows to open when --no-startup-window is specified. If I (the user of this box) were to later click on Chrome's icon in the taskbar, windows for all N profiles should open as if this was a fresh launch with full session restore.
 
Cc: rdevlin....@chromium.org
Components: -Platform>Extensions
It's not clear to me that this is an extensions issue - am I missing something?

(Tentatively removing the component, but add it back if I'm mistaken!)

Comment 2 by grt@chromium.org, Jun 11 2018

It's my understanding that background mode was created for extensions/apps that have the bg priv and Chrome's "Continue running background apps when Google Chrome is closed" setting is enabled (the default, I think), hence my adding the Extensions component to this bug.
Components: UI>Browser>Profiles
Status: Available (was: Untriaged)
Yeah, this is more of an issue for the folks maintaining the browser startup code - agreed that this is triggered primarily by extension background mode, but it's not in the extension codebase per se.

100% agreed that the correct behavior would be to not open any windows on startup if --no-startup-window is passed. I'm guessing some refactor over the last 5 years broke this.

Comment 4 by grt@chromium.org, Jun 12 2018

tmartino: do you know of a good candidate to take ownership of this?
Owner: tmartino@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 6 by sheriffbot@chromium.org, Jul 13

Status: Available (was: Assigned)
--Chrome Identity automated triaging--

This bug is Assigned and has gone one month without any activity, so it is being moved to Available to indicate that it is not actively being worked on. If you are working on this bug, please mark yourself as the owner and move back to Assigned. Please see https://goo.gl/78kbny for more details. Please remove the Services>SignIn or UI>Browser>Profiles components if this bug isn't related to Chrome Identity.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Assigned (was: Available)
Project Member

Comment 8 by sheriffbot@chromium.org, Sep 3

Status: Available (was: Assigned)
--Chrome Identity automated triaging--

This bug is Assigned and has gone one month without any activity, so it is being moved to Available to indicate that it is not actively being worked on. If you are working on this bug, please mark yourself as the owner and move back to Assigned. Please see https://goo.gl/78kbny for more details. Please remove the Services>SignIn or UI>Browser>Profiles components if this bug isn't related to Chrome Identity.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment