Skip to content

Commit

Permalink
[dPWA] Add bug comment and output url for invalid launch url of app.
Browse files Browse the repository at this point in the history
Bug: b/307307147, b/302377902
Change-Id: I3ea2d8c5931d7d91487907ab0e67175036665c2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4966313
Auto-Submit: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dibyajyoti Pal <dibyapal@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1214374}
  • Loading branch information
dmurph authored and Chromium LUCI CQ committed Oct 24, 2023
1 parent e49eb71 commit d574a59
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion chrome/browser/ui/web_applications/web_app_launch_process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ content::WebContents* WebAppLaunchProcess::Run() {
<< params_->app_id;
}
#else
DCHECK(registrar_->IsUrlInAppExtendedScope(launch_url, params_->app_id));
// TODO(dmurph): Figure out why this is failing. https://crbug.com/2546057
DCHECK(registrar_->IsUrlInAppExtendedScope(launch_url, params_->app_id))
<< launch_url.spec();
#endif

#if BUILDFLAG(IS_CHROMEOS_ASH)
Expand Down
9 changes: 7 additions & 2 deletions chrome/browser/web_applications/web_app_launch_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@ void WebAppLaunchQueue::Enqueue(WebAppLaunchParams launch_params) {
// App scope is a web app concept that is not applicable for extensions.
// Therefore this check will be skipped when launching an extension URL.
if (!IsExtensionURL(launch_params.target_url)) {
// TODO(dmurph): Figure out why this is failing.
// https://crbug.com/2546057
DCHECK(registrar_->IsUrlInAppExtendedScope(launch_params.target_url,
launch_params.app_id));
launch_params.app_id))
<< launch_params.target_url.spec();
}

DCHECK(launch_params.dir.empty() ||
Expand Down Expand Up @@ -204,7 +207,9 @@ void WebAppLaunchQueue::SendQueuedLaunchParams(const GURL& current_url) {

void WebAppLaunchQueue::SendLaunchParams(WebAppLaunchParams launch_params,
const GURL& current_url) {
DCHECK(IsInScope(launch_params, current_url));
// TODO(dmurph): Figure out why this is failing.
// https://crbug.com/2546057
DCHECK(IsInScope(launch_params, current_url)) << current_url.spec();
mojo::AssociatedRemote<blink::mojom::WebLaunchService> launch_service;
web_contents()
->GetPrimaryMainFrame()
Expand Down

0 comments on commit d574a59

Please sign in to comment.