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

Unified Diff: content/public/browser/content_browser_client.cc

Issue 2946113002: Use FrameIsAd to decide whether to isolate a frame in TopDocumentIsolation mode. (Closed)
Patch Set: Addressing CR feedback from creis@. Created 3 years, 6 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/public/browser/content_browser_client.cc
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 529f49fa7ff5469f6a1b4a0858b5de96a5ee8a2e..2ad9da397687f54921db43fc82d4d206afe7b4c3 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -91,11 +91,14 @@ bool ContentBrowserClient::ShouldAllowOpenURL(SiteInstance* site_instance,
return true;
}
-bool ContentBrowserClient::
- ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation(
- const GURL& url,
- SiteInstance* parent_site_instance) {
- return false;
+bool ContentBrowserClient::ShouldIsolateFrameForTopDocumentIsolation(
+ RenderFrameHost* frame,
+ const GURL& dest_url,
+ SiteInstance* main_frame_site_instance) {
+ // In absence of customizations above //content layer, TDI mode should isolate
+ // all cross-site frames. Additionally, isolating all cross-site frames makes
+ // it easier to test TopDocumentIsolation in content_browsertests.
+ return true;
}
bool ContentBrowserClient::IsSuitableHost(RenderProcessHost* process_host,

Powered by Google App Engine
This is Rietveld 408576698