WebLayer: Move ownership of user_pref_service_ into BrowserContextImpl
Currently, user_prefs::UserPrefs::Get() is only needed within the context of WebLayer's safe browsing implementation on Android. However, it will shortly also be needed by WebLayer's SSL implementation (when we change that implementation to be based on the shared //components-level one rather than being a fork). SSL interstitials run on all platforms (concretely, Linux as well as Android). In preparation for that change, this CL moves the creation and ownership of WebLayer's user prefs service into BrowserContextImpl. This change both ensures that the PrefService is created and registered on all platforms rather than only Android and also aligns WebLayer with how user pref service creation and ownership is structured in other embedders in which user_prefs::UserPrefs::Get() is broadly used (e.g., Android WebView and Chrome). Bug: 1026591 Change-Id: Ibab57af127aca76f3944389896f538b1f2571e9f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930658Reviewed-by:Tim Volodine <timvolodine@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#719073}
Showing
Please register or sign in to comment