• Joel Hockey's avatar
    Rearrange GetPrimaryUserProfile() to work in unit tests · 6b29bb7d
    Joel Hockey authored
    Rearranged ProfileManager::GetPrimaryUserProfile() to be able to run in
    unit tests.  The early check of g_browser_process->profile_manager() is
    not relevant for IS_CHROMEOS_ASH with a logged in user and it causes
    unit tests to fail unnecessarily.
    
    This has resulted in a few places where the code is duplicated which can
    now be removed and use ProfileManager::GetPrimaryUserProfile().
    
    Change-Id: I164b5c20dbc54cbd59c22bf7f84b5376af1b88c2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2596903
    Auto-Submit: Joel Hockey <joelhockey@chromium.org>
    Reviewed-by: default avatarDavid Roger <droger@chromium.org>
    Commit-Queue: Joel Hockey <joelhockey@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#837968}
    6b29bb7d
plugin_vm_service_provider.cc 6.78 KB