• Tarun Bansal's avatar
    NQE: Read cache at startup only after pref service has been initialized · faaa9346
    Tarun Bansal authored
    Currently, the pref delegate in network quality estimator (NQE) reads
    network quality prefs right after startup. However, the underlying pref
    service factory is initialized asynchronously by the network_context
    (see the linked bug). This results in pref delegate read at startup
    returning empty value, irrespective of the actual prefs.
    
    This CL fixes the bug by changing pref delegate to read the pref only
    after the pref service has been initialized. This ensures that
    when the prefs are read, they actually return what's stored on the
    disk, instead of empty values.
    
    Change-Id: I9791c673c0300d6d896f2d8e556c97f01f7e1f52
    Bug: 904465
    Reviewed-on: https://chromium-review.googlesource.com/c/1333127
    Commit-Queue: Tarun Bansal <tbansal@chromium.org>
    Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#608544}
    faaa9346
BUILD.gn 288 KB