Skip to content
  • rockot's avatar
    Make browser process a singleton service · 73b9848f
    rockot authored
    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}
    73b9848f