Fix race condition in CrostiniRestarter

Fix race condition in CrostiniRestarter where the WeakPtr to CrostiniManager
could be dereferenced even if the CrostiniManager had been deleted.

BUG=None
TEST=Started and uninstalled Crostini apps, both when Linux was running
and when it was shut down.

Change-Id: I70760863ccce6494be5a723a9e970822b025b8d5
Reviewed-on: https://chromium-review.googlesource.com/c/1464111
Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
Auto-Submit: Ian Barkley-Yeung <iby@chromium.org>
Reviewed-by: Nicholas Verne <nverne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631519}
1 file changed