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

Unified Diff: chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc

Issue 2840383002: Disable top-document-isolation if the parent SiteInstance is a hosted app. (Closed)
Patch Set: Addressing CR feedback. Created 3 years, 7 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: chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
diff --git a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
index 5ade75a38f920848d783a8d27b94d7bbec945838..e66776da517c792d1e707219f12d842e547635ae 100644
--- a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
+++ b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
@@ -685,6 +685,19 @@ ChromeContentBrowserClientExtensionsPart::GetVpnServiceProxy(
}
// static
+bool ChromeContentBrowserClientExtensionsPart::
+ ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation(
+ const GURL& subframe_url,
+ content::SiteInstance* parent_site_instance) {
+ const Extension* extension =
+ ExtensionRegistry::Get(parent_site_instance->GetBrowserContext())
+ ->enabled_extensions()
+ .GetExtensionOrAppByURL(parent_site_instance->GetSiteURL());
+
+ return extension && extension->is_hosted_app();
+}
+
+// static
void ChromeContentBrowserClientExtensionsPart::RecordShouldAllowOpenURLFailure(
ShouldAllowOpenURLFailureReason reason,
const GURL& site_url) {

Powered by Google App Engine
This is Rietveld 408576698