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

Unified Diff: content/shell/browser/shell_content_browser_client.cc

Issue 2946113002: Use FrameIsAd to decide whether to isolate a frame in TopDocumentIsolation mode. (Closed)
Patch Set: Use FOR_EACH_TDI_MODE(V) macro. 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/shell/browser/shell_content_browser_client.cc
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index 62fb2b6201b4e70dbaebdba10720dc637def9379..18c1cdebfdcff90ce790662abe5a3d2ffdaf91bd 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <utility>
+#include <vector>
#include "base/base_switches.h"
#include "base/command_line.h"
@@ -347,6 +348,16 @@ net::NetLog* ShellContentBrowserClient::GetNetLog() {
return shell_browser_main_parts_->net_log();
}
+bool ShellContentBrowserClient::ShouldIsolateFrameFromMainContent(
+ content::RenderFrameHost* frame,
+ const GURL& dest_url,
+ content::SiteInstance* main_frame_site_instance) {
+ // To make it easier to test TopDocumentIsolation in content_browsertests,
+ // put *all* cross-site subframes into the TDI process (when TDI mode is
+ // enabled).
+ return true;
+}
+
bool ShellContentBrowserClient::ShouldSwapProcessesForRedirect(
BrowserContext* browser_context,
const GURL& current_url,

Powered by Google App Engine
This is Rietveld 408576698