• Nicholas Verne's avatar
    CrostiniRestarter static data is now handled by a KeyedService. · 36d0cc24
    Nicholas Verne authored
    CrostiniRestarterService and CrostiniRestarterServiceFactory are kept
    local to CrostiniManager (for now) as they don't need to be exposed to
    other code. There is one CrostiniRestarterService per profile, and it
    owns CrostiniRestarter objects for that profile.
    
    When multiple calls to CrostiniManager::RestartCrostini are made due to
    user action, only one actual restart flow will run, and when it
    completes, multiple completion callbacks will run in succession.
    
    Bug: 839207
    Change-Id: Icbf1da00fd9c937cd51bb77f0ad57bd63476b27b
    Reviewed-on: https://chromium-review.googlesource.com/1051208
    Commit-Queue: Nicholas Verne <nverne@chromium.org>
    Reviewed-by: default avatarTimothy Loh <timloh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#558194}
    36d0cc24
crostini_manager.cc 33.6 KB