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

Unified Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 2411693003: Move blocking of top-level navigations to nested URLs with extension origins from non-extension pro… (Closed)
Patch Set: review nits 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
Index: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index b0f6efe4efab876abe3faade52850886b9d2f0b9..b0cb4288bde83f41816c0223889f9941aff8f527 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -91,6 +91,10 @@ NavigationHandleImpl::NavigationHandleImpl(
weak_factory_(this) {
DCHECK(!navigation_start.is_null());
redirect_chain_.push_back(url);
+
+ starting_site_instance_ =
+ frame_tree_node_->current_frame_host()->GetSiteInstance();
+
GetDelegate()->DidStartNavigation(this);
if (IsInMainFrame()) {
@@ -128,6 +132,10 @@ const GURL& NavigationHandleImpl::GetURL() {
return url_;
}
+SiteInstance* NavigationHandleImpl::GetStartingSiteInstance() {
+ return starting_site_instance_.get();
+}
+
bool NavigationHandleImpl::IsInMainFrame() {
return frame_tree_node_->IsMainFrame();
}
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.h ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698