New issue
Advanced search Search tips

Issue 854209 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Split ContentMain start and ServiceManager Start into 2 separate methods

Project Member Reported by qin...@chromium.org, Jun 19 2018

Issue description

For chrome to be launched with sericeManager only, it currently uses the same ServiceManager::Main() as being used by launching the full browser mode.
The only difference is in the parameters being passed.

This is very confusing since the servicemanager launch should always come before the full browser launch.
To solve this issue, we can split the current browser launch into 2 parts, first we launch the service manager, then launch the full browser, so that we don't reuse the same ServiceManager::Main() entry point.

This also impacts the BrowserStartupController, as we need to split the current startBrowserProcessAsync(sync) into 2 parts. First launch the sericemanager, and when ServiceManager is launched, we launch the remaining of the browser process.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 11

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

commit a1105c68d4ac769d98f7dfd1e6303ea778fe1a6b
Author: Xi Han <hanxi@google.com>
Date: Wed Jul 11 15:25:01 2018

Split ContentMain start and ServiceManager Start.

With "allow-start-service-manager-only" flag, we can start the service
manager without starting the remaining parts of the browser,
particularly the browser main loop. Later, we could start the full
browser with the service manager running. Currently, both code path go
through service_manager::main(). Therefore, we need to avoid calling the
initialization in service_manager::main() multiple times.

In this CL:
1. service_manager::main() checks its static bool flag to decide
   whether initialization should be called.
2. Plumbs the start-service-manager-only flag to the ContentMainRunner
   who starts the browser main loop.

This CL impacts Android only for now. It follows up CL:
 https://crrev.com/c/1093303.

BUG=854209,  846846 

Change-Id: I7fcfb804ce7f3065da7df12947674344fe2f56d6
Reviewed-on: https://chromium-review.googlesource.com/1114077
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574169}
[modify] https://crrev.com/a1105c68d4ac769d98f7dfd1e6303ea778fe1a6b/content/app/android/content_main.cc
[modify] https://crrev.com/a1105c68d4ac769d98f7dfd1e6303ea778fe1a6b/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/a1105c68d4ac769d98f7dfd1e6303ea778fe1a6b/content/app/content_main_runner_impl.h
[modify] https://crrev.com/a1105c68d4ac769d98f7dfd1e6303ea778fe1a6b/content/app/content_service_manager_main_delegate.cc
[modify] https://crrev.com/a1105c68d4ac769d98f7dfd1e6303ea778fe1a6b/content/app/content_service_manager_main_delegate.h
[modify] https://crrev.com/a1105c68d4ac769d98f7dfd1e6303ea778fe1a6b/content/public/app/content_main_runner.h
[modify] https://crrev.com/a1105c68d4ac769d98f7dfd1e6303ea778fe1a6b/services/service_manager/embedder/main.cc

Status: Assigned (was: Untriaged)
This bug has an owner, thus, it's been triaged. Changing status to "assigned".

Sign in to add a comment