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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2166113002: Simplify decidePolicyForNavigation + remove POST-only-in-http(s) DCHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 2f419abd1c281a6440243692b8bf1172c357a28d..d6c00542a565cd05d80cf6e45b150c1dc37bb5e6 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4985,12 +4985,10 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
info.navigationType != blink::WebNavigationTypeReload);
if (!should_fork && url.SchemeIs(url::kFileScheme)) {
- // Fork non-file to file opens. Check the opener URL if this is the
- // initial navigation in a newly opened window.
- GURL source_url(old_url);
- if (is_initial_navigation && source_url.is_empty() && frame_->opener())
- source_url = frame_->opener()->top()->document().url();
- should_fork = !source_url.SchemeIs(url::kFileScheme);
+ // Fork non-file to file opens. Note that this may fork unnecessarily if
+ // another tab (hosting a file or not) targeted this one before its
+ // initial navigation, but that shouldn't cause a problem.
+ should_fork = !old_url.SchemeIs(url::kFileScheme);
Łukasz Anforowicz 2016/07/20 22:23:04 The changes above [should] just replicate the chan
}
if (!should_fork) {

Powered by Google App Engine
This is Rietveld 408576698