Commit a6245bb2 authored by David Jacobo's avatar David Jacobo Committed by Commit Bot

Enforce not launching apps via "open link in a new tab"

Previously "Open link in a new tab/window" via context menu would allow
the user to stay on the web, regardless of whether or not we have
installed apps that are good candidates (because of the url/intent
filters the app exposes) nor if such apps were marked as preferred
before.

This CL aims to fix a regression where the user would escape to an
installed app that was marked as preferred before (it can also be a
verified app) while trying to open a given url on a new tab/window.

new tab via context menu.

Bug: 968616
Test: Manual checked yelp app is not opening while clicking open in a
Change-Id: I9ebc76eeef44e73b204b8ac28343643ef584d50d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638144Reviewed-by: default avatarMaggie Cai <mxcai@chromium.org>
Commit-Queue: David Jacobo <djacobo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665073}
parent 9351601c
...@@ -455,7 +455,8 @@ AppsNavigationThrottle::HandleRequest() { ...@@ -455,7 +455,8 @@ AppsNavigationThrottle::HandleRequest() {
content::WebContents* web_contents = handle->GetWebContents(); content::WebContents* web_contents = handle->GetWebContents();
const GURL& url = handle->GetURL(); const GURL& url = handle->GetURL();
if (!ShouldIgnoreNavigation(page_transition, kAllowFormSubmit, if (!ShouldIgnoreNavigation(page_transition, kAllowFormSubmit,
kAllowClientRedirect)) { kAllowClientRedirect) &&
!handle->WasStartedFromContextMenu()) {
navigate_from_link_ = true; navigate_from_link_ = true;
} }
......
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