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

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

Issue 2987563004: Revert of Use FrameIsAd to decide whether to isolate a frame in TopDocumentIsolation mode. (Closed)
Patch Set: Created 3 years, 5 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 0628a00d9aa2db06a0f0558dd3010f24ee957cd9..6254ba8daf289d352c138e0a77a963a5b8f779e5 100644
--- a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
+++ b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
@@ -6,10 +6,7 @@
#include <stddef.h>
-#include <memory>
#include <set>
-#include <string>
-#include <vector>
#include "base/command_line.h"
#include "base/debug/alias.h"
@@ -687,14 +684,14 @@
// static
bool ChromeContentBrowserClientExtensionsPart::
- IsMainFrameSiteInstanceExcludedFromTopDocumentIsolation(
- content::SiteInstance* main_frame_site_instance) {
- // Disable TDI if the main frame's SiteInstance is a hosted app.
- // See also https://crbug.com/679011.
- const Extension* extension =
- ExtensionRegistry::Get(main_frame_site_instance->GetBrowserContext())
+ ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation(
+ const GURL& subframe_url,
+ content::SiteInstance* parent_site_instance) {
+ const Extension* extension =
+ ExtensionRegistry::Get(parent_site_instance->GetBrowserContext())
->enabled_extensions()
- .GetExtensionOrAppByURL(main_frame_site_instance->GetSiteURL());
+ .GetExtensionOrAppByURL(parent_site_instance->GetSiteURL());
+
return extension && extension->is_hosted_app();
}

Powered by Google App Engine
This is Rietveld 408576698