Issue metadata
Sign in to add a comment
|
Pref service: expose local prefs as a service |
||||||||||||||||||||||||
Issue descriptionThe network service needs to access the proxy-related commandline flags which are stored in local prefs. Please see: https://cs.chromium.org/chromium/src/chrome/browser/prefs/chrome_command_line_pref_store.cc?rcl=7ac2374e5a71a1c49f8cf433726ce6f4afb81c4e&l=104 Currently the pref service only supports per-profile prefs. It would be nice to add support for local prefs.
,
May 16 2017
,
May 16 2017
FYI, in a network-service-dev discussion, Matt suggested that maybe we should keep the pref access outside of the network service: """I've been thinking we may need to have the ProxyConfigService live out of process (On Linux, it depends on GTK, which is also no something I'm sure we want in the network process. On ChromeOS, it also has bonus logic that I believe depends on other chrome classes).""" In that case, the network service doesn't need to depend on the pref service directly. But this ProxyConfigService will still need to access the proxy local prefs.
,
Jun 5 2017
,
Jun 5 2017
,
Jun 7 2017
Upon further investigation I'm not sure initializing SM earlier is really a great option. As long as the Service Manager is embedded in the browser, there needs to be a way for embedded services to be installed at SM initialization time. Their service factories may (and currently do in many cases) want to refer to specific BrowserThread task runners. Here are some ways we might address this: 1. Initialize the embedded Service Manager in two phases, with the first phase being just enough to run essential services like prefs and maybe network - these would in turn be restricted from referencing BrowserThreads. 2. Initialize BrowserThread TaskRunners in a queuing state before the threads are actually created. This would allow for earlier ServiceManagerContext creation. 3. Forbid access to BrowserThread task runners here and give services some other way to specify what thread they want to be run on. Such services won't be reachable until after browser threads are created. Each of those options adds significant complexity and still requires that we bring up the IO thread earlier. Is it possible to instead make other things happen later? i.e. why does anything need to access local prefs before threads are started? Can we change it? I notice this bug refers to the network service needing proxy-related command line flags stored by ChromeCommandLinePrefStore. We obviously can't run the network service until we have a service manager anyway, so why would the network service need these flags sooner than that?
,
Jun 7 2017
Network service probably doesn't need the local prefs that earlier. My understanding of comment #1 is that there are other cases where people need local prefs at an early stage, without this support we cannot switch all local pref users to use the Mojo service. (I don't know what those cases are.)
,
Jun 7 2017
Ash (under mustash) can generally access local state prefs fairly late in startup.
,
Jun 21 2017
,
Jun 22 2017
,
Jul 11 2017
Where is this on the services-dev roadmap? I recently approved a CL that allows code in ash to use Local State preferences. https://chromium-review.googlesource.com/c/566026/ I think this is the right long-term approach, but it means that mustash can't ship until pref service supports local state.
,
Jul 11 2017
When prefs decapsulation (https://crrev.com/c/554653/) finishes, this will be almost trivial (https://crrev.com/c/557580/).
,
Jul 14 2017
,
Jul 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa commit e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa Author: Sam McNally <sammc@chromium.org> Date: Thu Jul 20 01:04:28 2017 Pref service: Expose local state prefs to mash as a service. Expose local state prefs from the browser using a InProcessPrefServiceFactory in BrowserProcessImpl and register it as a embedded service factory in ChromeContentBrowserClient. Add plumbing of a PrefValueStore::Delegate to PrefServiceFactory to match PrefServiceSyncableFactory to capture the PrefStores to be exposed via the local state pref service. Duplicate the existing pref service manifest as "local_state" to avoid colliding with the per-profile pref service; each service may only be packaged in a single service so a distinct service name is required. Bug: 714855 Change-Id: I31131be6b5c720fa28e83a81febeea9c524c3cfe Reviewed-on: https://chromium-review.googlesource.com/557580 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Noel Gordon <noel@chromium.org> Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Sam McNally <sammc@chromium.org> Cr-Commit-Position: refs/heads/master@{#488070} [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/ash/mus/manifest.json [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/ash/shell.cc [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/ash/shell.h [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/chrome/app/BUILD.gn [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/chrome/browser/browser_process.h [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/chrome/browser/browser_process_impl.cc [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/chrome/browser/browser_process_impl.h [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/chrome/browser/chrome_browser_main.cc [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/chrome/browser/chrome_content_browser_client.cc [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/chrome/browser/prefs/chrome_pref_service_factory.cc [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/chrome/browser/prefs/chrome_pref_service_factory.h [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/chrome/test/base/testing_browser_process.cc [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/chrome/test/base/testing_browser_process.h [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/components/prefs/pref_service_factory.cc [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/components/prefs/pref_service_factory.h [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/services/preferences/BUILD.gn [add] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/services/preferences/local_state_manifest.json [modify] https://crrev.com/e36abbc2559c57a41d35da0bc8c4da98bf9dd0fa/services/preferences/public/interfaces/preferences.mojom
,
Jul 31 2017
,
Feb 26 2018
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by tibell@chromium.org
, Apr 25 2017