Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Issue 2695803004: Make browser process a singleton service (Closed)

Created:
3 years, 10 months ago by Ken Rockot(use gerrit already)
Modified:
3 years, 10 months ago
Reviewers:
jam, sky
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), darin-cc_chromium.org, davemoore+watch_chromium.org, jam, kalyank, oshima+watch_chromium.org, qsr+mojo_chromium.org, sadrul, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make browser process a singleton service Changes the primordial browser process service manager connection to identify as a singleton service named content_packaged_services. This is used to package any existing global services previously associated with the global root content_browser connection. The root content_browser connection still exists in order to serve as a client process host for non-renderer child processes. One result of this change is that no services other than content_* are allowed to connect directly to content_browser, in order to avoid racing with the (now asynchronous) content_browser instance creation by ServiceManagerContext. As such, code which previously connected to content_browser has also been fixed to do something less weird. To wit: - An "ash" service is now embedded in the browser process when not running in mash mode - this allows simplification of ash client code as there is no longer a need to switch the target service name at runtime when connecting to ash interfaces - A new "chrome" service is packaged in content_packaged_services by within Chrome. This hosts a mash::mojom::Launchable interface, allowing Chrome to be launched within mash by connecting to "chrome" - ChromeInterfaceFactory is deleted Somewhat unrelated but because this CL exposed a timing issue between packaged service connection and main thread browser initialization, this also removes the unnecessary blocking of startup on service manager connection (see change in chrome_browser_main_extra_parts_views.cc.) BUG=649407, 594852 TEST=chrome --mash functions normally, standalone mash runner functions normally with chrome, chrome non-mash functions normally, browser_tests work with and without --run-in-mash TBR=tsepez@chromium.org Review-Url: https://codereview.chromium.org/2695803004 Cr-Commit-Position: refs/heads/master@{#450750} Committed: https://chromium.googlesource.com/chromium/src/+/73b9848f38e00bf1b9f48cfa2da7f8cda7c41599

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 9

Patch Set 5 : . #

Patch Set 6 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+374 lines, -328 lines) Patch
M ash/mus/manifest.json View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/app/BUILD.gn View 1 2 3 4 4 chunks +62 lines, -11 lines 0 comments Download
A chrome/app/chrome_manifest.json View 1 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/app/mash/BUILD.gn View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/app/mash/mash_runner.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/browser_resources.grd View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 6 chunks +94 lines, -3 lines 0 comments Download
M chrome/browser/chrome_content_browser_manifest_overlay.json View 1 1 chunk +1 line, -23 lines 0 comments Download
A chrome/browser/chrome_content_packaged_services_manifest_overlay.json View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/BUILD.gn View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
D chrome/browser/chromeos/chrome_interface_factory.h View 1 1 chunk +0 lines, -35 lines 0 comments Download
M chrome/browser/chromeos/chrome_interface_factory.cc View 1 1 chunk +0 lines, -154 lines 0 comments Download
M chrome/browser/prefs/preferences_connection_manager.cc View 1 2 3 4 5 2 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/ui/ash/ash_util.h View 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/ash_util.cc View 1 1 chunk +41 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc View 1 2 chunks +1 line, -7 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/base/mojo_test_connector.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M content/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_manager/service_manager_context.h View 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/service_manager/service_manager_context.cc View 1 9 chunks +58 lines, -52 lines 0 comments Download
M content/common/service_manager/service_manager_connection_impl.h View 1 2 chunks +0 lines, -2 lines 0 comments Download
M content/common/service_manager/service_manager_connection_impl.cc View 1 2 chunks +0 lines, -8 lines 0 comments Download
M content/content_resources.grd View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/public/app/BUILD.gn View 1 chunk +9 lines, -4 lines 0 comments Download
A content/public/app/mojo/content_packaged_services_manifest.json View 1 chunk +28 lines, -0 lines 0 comments Download
M content/public/common/service_manager_connection.h View 1 1 chunk +0 lines, -4 lines 0 comments Download
M content/public/common/service_names.mojom View 1 chunk +5 lines, -0 lines 0 comments Download
M mash/BUILD.gn View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M mash/session/session.cc View 1 chunk +1 line, -1 line 0 comments Download
M services/service_manager/public/cpp/interface_registry.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M services/service_manager/public/cpp/lib/interface_registry.cc View 1 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (31 generated)
Ken Rockot(use gerrit already)
Scott, since Ben is OOO you win the prestigious honor of reviewing this CL! Please ...
3 years, 10 months ago (2017-02-14 22:54:22 UTC) #13
sky
https://codereview.chromium.org/2695803004/diff/60001/chrome/app/BUILD.gn File chrome/app/BUILD.gn (right): https://codereview.chromium.org/2695803004/diff/60001/chrome/app/BUILD.gn#newcode407 chrome/app/BUILD.gn:407: ":chrome_content_packaged_services_manifest_overlay_for_mash", Should all the mash related stuff be guarded ...
3 years, 10 months ago (2017-02-15 00:35:26 UTC) #18
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2695803004/diff/60001/chrome/app/BUILD.gn File chrome/app/BUILD.gn (right): https://codereview.chromium.org/2695803004/diff/60001/chrome/app/BUILD.gn#newcode407 chrome/app/BUILD.gn:407: ":chrome_content_packaged_services_manifest_overlay_for_mash", On 2017/02/15 at 00:35:26, sky wrote: > Should ...
3 years, 10 months ago (2017-02-15 01:38:05 UTC) #21
sky
LGTM
3 years, 10 months ago (2017-02-15 16:22:56 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2695803004/100001
3 years, 10 months ago (2017-02-15 16:32:59 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/365033)
3 years, 10 months ago (2017-02-15 16:43:14 UTC) #32
Ken Rockot(use gerrit already)
+jam for content
3 years, 10 months ago (2017-02-15 17:11:39 UTC) #34
jam
lgtm
3 years, 10 months ago (2017-02-15 18:24:25 UTC) #35
Ken Rockot(use gerrit already)
TBR tsepez for constant addition in mojom
3 years, 10 months ago (2017-02-15 18:33:01 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2695803004/100001
3 years, 10 months ago (2017-02-15 18:34:08 UTC) #39
commit-bot: I haz the power
3 years, 10 months ago (2017-02-15 18:58:44 UTC) #42
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/73b9848f38e00bf1b9f48cfa2da7...

Powered by Google App Engine
This is Rietveld 408576698