• Jay Harris's avatar
    WebApps: Moves implementation of FindAppWithUrlInScope into AppRegistrar · 65401431
    Jay Harris authored
    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: default avatarAlexey Baskakov <loyso@chromium.org>
    Reviewed-by: default avatarAlan Cutter <alancutter@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#715811}
    65401431
test_app_registrar.cc 4.26 KB