WebApps: Moves implementation of FindAppWithUrlInScope into AppRegistrar
Previously, WebApps and BookmarkApps had their own implementations of FindAppWithUrlInScope, that did essentially the same thing. However, the BookmarkApps implementation didn't take match length into account (the longest match should always be returned). Instead of adding this sort to BookmarkApps, this moves the implementation into the generic AppRegistrar class, seeing as we have all the primitives we require there. In addition, this changes the behaviour of WebAppRegistrar::GetAppScope to return base::nullopt instead of an empty scope. This fixes the broken behaviour of AppRegistrar::IsAppShortcut. Bug: 1023244 Change-Id: I66aee439a1fbe8f1718f7ca351d37692ff8c3e46 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1909055 Commit-Queue: Jay Harris <harrisjay@chromium.org> Reviewed-by:Alexey Baskakov <loyso@chromium.org> Reviewed-by:
Alan Cutter <alancutter@chromium.org> Cr-Commit-Position: refs/heads/master@{#715811}
Showing
Please register or sign in to comment