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

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 comments 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..35d3291a9da2a045bbff3a7730dc10e9d01e49a1 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -14,6 +14,7 @@
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/frame_host/navigator.h"
#include "content/browser/frame_host/navigator_delegate.h"
+#include "content/browser/frame_host/render_frame_host_manager.h"
alexmos 2016/10/13 00:46:27 nit: is this still necessary?
jam 2016/10/13 03:12:28 Done.
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/browser/service_worker/service_worker_navigation_handle.h"
#include "content/common/frame_messages.h"
@@ -91,6 +92,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 +133,10 @@ const GURL& NavigationHandleImpl::GetURL() {
return url_;
}
+SiteInstance* NavigationHandleImpl::GetStartingSiteInstance() {
+ return starting_site_instance_.get();
+}
+
bool NavigationHandleImpl::IsInMainFrame() {
return frame_tree_node_->IsMainFrame();
}

Powered by Google App Engine
This is Rietveld 408576698