Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(706)

Unified Diff: chrome/browser/chromeos/arc/arc_external_protocol_dialog.cc

Issue 2459803002: Handle navigations with PAGE_TRANSITION_CLIENT_REDIRECT qualifier (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_external_protocol_dialog.cc
diff --git a/chrome/browser/chromeos/arc/arc_external_protocol_dialog.cc b/chrome/browser/chromeos/arc/arc_external_protocol_dialog.cc
index 090a61667999f8e75e7509cb36ac96ed49b3db09..f6fd12ad93a54d021abb85c5daeecc769f62731c 100644
--- a/chrome/browser/chromeos/arc/arc_external_protocol_dialog.cc
+++ b/chrome/browser/chromeos/arc/arc_external_protocol_dialog.cc
@@ -194,6 +194,13 @@ bool RunArcExternalProtocolDialog(const GURL& url,
int routing_id,
ui::PageTransition page_transition,
bool has_user_gesture) {
+ // Handle client-side redirections. Forwarding such navigations to ARC is
+ // better than just showing the "can't open" dialog.
+ // TODO(djacobo): Check if doing this in arc::ShouldIgnoreNavigation is safe,
+ // and move it to the function if it is. (b/32442730#comment3)
+ page_transition = ui::PageTransitionFromInt(
+ page_transition & ~ui::PAGE_TRANSITION_CLIENT_REDIRECT);
+
// Try to forward <form> submissions to ARC when possible.
constexpr bool kAllowFormSubmit = true;
if (ShouldIgnoreNavigation(page_transition, kAllowFormSubmit))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698