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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2377833002: Block navigations in extensions via ShouldTransferNavigation (not via OpenURL). (Closed)
Patch Set: Add missing files under chrome/test/data/extensions/api_test/browser_action/popup_with_form/ 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/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 087e254a84a411484d54be6848827332b19b7733..840a53be5658f13a052b4621ed58ce7776f20bdb 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1076,6 +1076,16 @@ bool ChromeContentRendererClient::ShouldFork(WebLocalFrame* frame,
return true;
}
+ // TODO(lukasza): https://crbug.com/650694: For now, we skip the rest for POST
+ // submissions. This is because 1) in M54 there are some remaining issues
+ // with POST in OpenURL path (e.g. https://crbug.com/648648) and 2) OpenURL
+ // path regresses (blocks) navigations that result in downloads
+ // (https://crbug.com/646261). In the long-term we should avoid forking for
+ // extensions (not hosted apps though) altogether and rely on transfers logic
+ // instead.
+ if (http_method != "GET")
+ return false;
+
// If |url| matches one of the prerendered URLs, stop this navigation and try
// to swap in the prerendered page on the browser process. If the prerendered
// page no longer exists by the time the OpenURL IPC is handled, a normal

Powered by Google App Engine
This is Rietveld 408576698