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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 23842002: Whitelisting exts and plugins from cross-site document blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Comments & Coding style are improved. Created 7 years, 3 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
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/child/resource_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index ef9c3fc04d9a306ee5b4af59a4784042814afd79..7f4bfe242cfb23406a98e1f18063aad9f4542d68 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1305,4 +1305,14 @@ bool ChromeContentRendererClient::ShouldReportDetailedMessageForSource(
return extensions::IsSourceFromAnExtension(source);
}
+bool ChromeContentRendererClient::ShouldEnableSiteIsolationPolicy() const {
+ // SiteIsolationPolicy is off by default. We would like to activate cross-site
+ // document blocking (for UMA data collection) for normal renderer processes
+ // running a normal web page from the Internet. We only turn on
+ // SiteIsolationPolicy for a renderer process that does not have the extension
+ // flag on.
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ return !command_line->HasSwitch(switches::kExtensionProcess);
+}
+
} // namespace chrome
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/child/resource_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698