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

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

Issue 2363303003: Allow the external protocol dialog to handle FORM_SUBMIT navigation (Closed)
Patch Set: address comment Created 4 years, 3 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
Index: chrome/browser/chromeos/arc/arc_navigation_throttle.cc
diff --git a/chrome/browser/chromeos/arc/arc_navigation_throttle.cc b/chrome/browser/chromeos/arc/arc_navigation_throttle.cc
index 3c03da2e385b9fb668910273d4f83f1a2906bd11..813a06984a8295e1a7352f089f8a747f750c60f8 100644
--- a/chrome/browser/chromeos/arc/arc_navigation_throttle.cc
+++ b/chrome/browser/chromeos/arc/arc_navigation_throttle.cc
@@ -103,7 +103,15 @@ content::NavigationThrottle::ThrottleCheckResult
ArcNavigationThrottle::HandleRequest() {
const GURL& url = navigation_handle()->GetURL();
- if (ShouldIgnoreNavigation(navigation_handle()->GetPageTransition()))
+ // Always handle http(s) <form> submissions in Chrome for two reasons: 1) we
+ // don't have a way to send POST data to ARC, and 2) intercepting http(s) form
+ // submissions is not very important because such submissions are usually
+ // done within the same domain. ShouldOverrideUrlLoading() below filters out
+ // such submissions anyway.
+ constexpr bool kAllowFormSubmit = false;
+
+ if (ShouldIgnoreNavigation(navigation_handle()->GetPageTransition(),
+ kAllowFormSubmit))
return content::NavigationThrottle::PROCEED;
const GURL previous_url = navigation_handle()->GetReferrer().url;
« no previous file with comments | « chrome/browser/chromeos/arc/arc_external_protocol_dialog.cc ('k') | chrome/browser/chromeos/arc/page_transition_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698