• Colin Blundell's avatar
    WebLayer: Move ownership of user_pref_service_ into BrowserContextImpl · 35a923c4
    Colin Blundell authored
    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: default avatarTim Volodine <timvolodine@chromium.org>
    Commit-Queue: Colin Blundell <blundell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#719073}
    35a923c4
safe_browsing_service.cc 5.45 KB