MacPWAs: Fix multi-profile uninstall
Ensure that uninstalling an app will only cause the shim to go away if this is the last profile for which that app is installed. Make this distinction in web_app::internals::DeletePlatformShortcuts vs web_app::internals::DeleteMultiProfileShortcutsForApp (single vs multi profile). Add tests for this behavior. Update ShortcutManager to - Use a helper function UseAppShimRegistry to determine if an extension should be in the registry (only bookmark apps should). - Register apps in OnExtensionLoaded. This is needed because we are introducing the AppShimRegistry after users may have already installed apps (so we need to register them sometime). - Add hooks to call DeleteMultiProfileShortcutsForApp as needed. Update WebAppShortcutCreator to - Move a bunch of code into static helper functions (e.g, bundle id construction, using LaunchServices to look up apps, etc). - Add tests for new behaviors TBR=dominickn Bug: 1029048 Change-Id: I85807fc2cedbe4fbbd297179a5e59c781794e84c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1938452Reviewed-by:ccameron <ccameron@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#719662}
Showing
This diff is collapsed.
Please register or sign in to comment