MacPWAs: Fix duplicate bundle creation
The root cause of this bug is that the call to LSCopyApplicationURLsForBundleIdentifier that is made in WebAppShortcutCreator::GetAppBundlesByIdUnsorted will not necessarily find app shims that were created just moments ago (likely there is an asynchronous indexing that is going on). To fix this, make WebAppShortcutCreator::GetAppBundlesByIdUnsorted read through all of the app shims in the path under ~/Applications where app shims are created, and see if it finds an application that matches the one we are looking for, based on its Info.plist. Rather than add another place where Info.plists are manually parsed, merge all code that reads Info.plists from app bundles, and put all of the accessors for this data in a single BundleInfoPlist class. Note that some of the moved code is not well understood by this author (in particular, IsForCurrentUserDataDir and GetFullProfilePath). This BundleInfoPlist will be used more extensively in the updated code to delete zombie bundles and to provide more robust renaming. Bug: 937703 Change-Id: Ia292840debd9c74024d707f784dceab78443a536 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1500851 Commit-Queue: ccameron <ccameron@chromium.org> Reviewed-by:Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#638225}
Showing
This diff is collapsed.
Please register or sign in to comment