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

Side by Side Diff: content/browser/frame_host/navigator_impl.cc

Issue 2375623003: Revert of Allow top-level navigation in extension pop-ups if it only triggers a download. (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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 if (method != "POST" && post_body) { 752 if (method != "POST" && post_body) {
753 NOTREACHED(); 753 NOTREACHED();
754 post_body = nullptr; 754 post_body = nullptr;
755 } 755 }
756 756
757 // This call only makes sense for subframes if OOPIFs are possible. 757 // This call only makes sense for subframes if OOPIFs are possible.
758 DCHECK(!render_frame_host->GetParent() || 758 DCHECK(!render_frame_host->GetParent() ||
759 SiteIsolationPolicy::AreCrossProcessFramesPossible()); 759 SiteIsolationPolicy::AreCrossProcessFramesPossible());
760 760
761 // Allow the delegate to cancel the transfer. 761 // Allow the delegate to cancel the transfer.
762 if (!delegate_->ShouldTransferNavigation( 762 if (!delegate_->ShouldTransferNavigation())
763 render_frame_host->frame_tree_node()->IsMainFrame()))
764 return; 763 return;
765 764
766 GURL dest_url(url); 765 GURL dest_url(url);
767 Referrer referrer_to_use(referrer); 766 Referrer referrer_to_use(referrer);
768 FrameTreeNode* node = render_frame_host->frame_tree_node(); 767 FrameTreeNode* node = render_frame_host->frame_tree_node();
769 SiteInstance* current_site_instance = render_frame_host->GetSiteInstance(); 768 SiteInstance* current_site_instance = render_frame_host->GetSiteInstance();
770 if (!GetContentClient()->browser()->ShouldAllowOpenURL(current_site_instance, 769 if (!GetContentClient()->browser()->ShouldAllowOpenURL(current_site_instance,
771 url)) { 770 url)) {
772 dest_url = GURL(url::kAboutBlankURL); 771 dest_url = GURL(url::kAboutBlankURL);
773 } 772 }
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 if (pending_entry != controller_->GetVisibleEntry() || 1198 if (pending_entry != controller_->GetVisibleEntry() ||
1200 !should_preserve_entry) { 1199 !should_preserve_entry) {
1201 controller_->DiscardPendingEntry(true); 1200 controller_->DiscardPendingEntry(true);
1202 1201
1203 // Also force the UI to refresh. 1202 // Also force the UI to refresh.
1204 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1203 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1205 } 1204 }
1206 } 1205 }
1207 1206
1208 } // namespace content 1207 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_delegate.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698