• Aleksei Seren's avatar
    Fix shutdown histograms on browser closing. · 121533e5
    Aleksei Seren authored
    Shutdown histograms were not properly written because of several issues:
    1) There is an incorrect calculation of current open browsers which
    have not yet started to close. This leads to the fact that
    browser_shutdown::OnShutdownStarting() is not called in case of
    several browsers shutdown.
    2) During the closure of the browser we are trying to find if there is any
    background Chrome applications with help of KeepAliveRegistry::IsKeepingAlive()
    function call, which is actually tracking running Browsers also (i.e. it can
    return true even if there is no background application). So it is needed to
    introduce new function to track background applications only.
    
    R=sky@chromium.org
    BUG=707147
    BUG=707144
    
    Change-Id: If4f7c080965c95e2c0b810817e94a09f3a52ba51
    Reviewed-on: https://chromium-review.googlesource.com/760356
    Commit-Queue: Lei Zhang <thestig@chromium.org>
    Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
    Reviewed-by: default avatarNicolas Dossou-Gbété <dgn@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#519810}
    121533e5
keep_alive_registry.cc 6.45 KB