• Lutz Justen's avatar
    KerberosCredentialsManager: Listen to pref changes · 7b7b5715
    Lutz Justen authored
    Adds code so KerberosCredentialsManager can listen to the 4 Kerberos
    prefs and handles kerberos.enabled (removes all existing accounts).
    
    Moves the registration of 3 prefs from profile to local_state since
    those prefs were not per-profile, anyway, and it simplifies lifetime of
    KerberosCredentialsManager as it does not have to wait for the primary
    user to be available.
    
    Also changes lifetime from a static singleton to explicit management
    since KerberosCredentialsManager owns a pointer to local_state now and
    it would otherwise be hard to justify that the pointer is never
    dangling.
    
    TBR=battre@chromium.org
    
    BUG=chromium:952239
    TEST=Turn KerberosEnabled policy on, navigate to
         chrome://settings/kerberosAccounts, add an account,
         Turn KerberosEnabled policy off, verify that the account vanishes.
    
    Change-Id: I3f4ed443014726d8b2c5f2cc536703badf37d2ae
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1617455
    Commit-Queue: Lutz Justen <ljusten@chromium.org>
    Reviewed-by: default avatarDominic Battré <battre@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Reviewed-by: default avatarPavol Marko <pmarko@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#664432}
    7b7b5715
browser_prefs.cc 49.1 KB