Close the App Info Dialog if the app or profile becomes invalid
Adds the App Info dialog as a profile observer, and closes the dialog
if the current profile is destroyed. Also, if the App Info Dialog is
open for an app and it is uninstalled asynchronously, close the dialog.
This prevents errors where actions can still be taken on the app even
though it's been removed.
BUG=
384999,
408473
TEST=While the App Info Dialog is open for an app, uninstall the app.
The dialog and app list should close.
TEST=While the App Info Dialog is open, destroy the profile the app list
is open for. The dialog and app list should close.
Committed:
https://crrev.com/58aac678723b1e9c82e2cf5572180b6923d19fc4
Cr-Commit-Position: refs/heads/master@{#297605}