Commit 996ca777 authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

desktop-pwas: Fix FindAppWithUrlInScope() comment in AppRegistrar

The comment for FindAppWithUrlInScope() and
FindInstalledAppWithUrlInScope() was out of date. We now search for the
app with the most specific scope for the provided URL rather than the
first matching one.

This behaviour was changed by:
https://chromium-review.googlesource.com/c/chromium/src/+/1909055

Change-Id: Ia99108f9aaf194890ea89cf7661e62883b3109ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2160828
Auto-Submit: Alan Cutter <alancutter@chromium.org>
Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762509}
parent 595dd2d7
......@@ -110,16 +110,16 @@ class AppRegistrar {
// does not refer to an installed web app.
GURL GetAppScope(const AppId& app_id) const;
// Searches for the first app id in the registry for which the |url| is in
// scope.
// Returns the app id of an app in the registry with the longest scope that is
// a prefix of |url|, if any.
base::Optional<AppId> FindAppWithUrlInScope(const GURL& url) const;
// Finds all apps that are installed under |scope|.
std::vector<AppId> FindAppsInScope(const GURL& scope) const;
// Searches for the first locally installed app id in the registry for which
// the |url| is in scope. If |window_only| is specified, only apps that
// open in app windows will be considered.
// Returns the app id of an installed app in the registry with the longest
// scope that is a prefix of |url|, if any. If |window_only| is specified,
// only apps that open in app windows will be considered.
base::Optional<AppId> FindInstalledAppWithUrlInScope(
const GURL& url,
bool window_only = false) const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment