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

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

Issue 2451093004: 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/intent_helper/arc_external_protocol_dialog.cc
diff --git a/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc b/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc
index cc7c17675c76c57d530ddd8c3df0e8bd272f3885..05a401638115229c81e8668d2bd1356bed4a9c9e 100644
--- a/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc
+++ b/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc
@@ -349,6 +349,13 @@ bool RunArcExternalProtocolDialog(const GURL& url,
// This function is for external protocols that Chrome cannot handle.
DCHECK(!url.SchemeIsHTTPOrHTTPS()) << url;
+ // 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)
djacobo_ 2016/10/26 22:41:06 I will, thanks!
+ 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