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

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: Updated comments and test expectations for --site-per-process behavior. Created 3 years, 8 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());
Devlin 2017/05/03 22:54:26 Why do we do this unequivocally, rather than check
Łukasz Anforowicz 2017/05/03 23:22:21 parent_site_instance->GetSiteURL() is an *effectiv
Charlie Reis 2017/05/03 23:37:36 Yeah, there's two aspects here: 1) For TDI, we're
Łukasz Anforowicz 2017/05/04 16:17:44 BTW: I should note that GetExtensionOrAppByURL is
Devlin 2017/05/04 17:20:45 Sorry that this was unclear. The call to GetExten
Łukasz Anforowicz 2017/05/04 18:58:19 Agreed - with this CL, hosted apps have *less* iso
+
+ 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