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 1fa7a9cc91667b06716abe8facba1a0671e46219..58643ff06c087acf34c23ba4ca272ebe2626fee1 100644 |
--- a/chrome/renderer/chrome_content_renderer_client.cc |
+++ b/chrome/renderer/chrome_content_renderer_client.cc |
@@ -66,6 +66,7 @@ |
#include "components/autofill/content/renderer/password_autofill_agent.h" |
#include "components/autofill/content/renderer/password_generation_manager.h" |
#include "components/visitedlink/renderer/visitedlink_slave.h" |
+#include "content/child/site_isolation_policy.h" |
Charlie Reis
2013/09/03 16:43:23
Yeah, we can only include things from content/publ
dsjang
2013/09/03 19:13:11
Done.
|
#include "content/public/common/content_constants.h" |
#include "content/public/renderer/render_thread.h" |
#include "content/public/renderer/render_view.h" |
@@ -345,6 +346,19 @@ void ChromeContentRendererClient::RenderThreadStarted() { |
extensions::ExtensionsClient::Set( |
extensions::ChromeExtensionsClient::GetInstance()); |
+ |
+ // SiteIsolationPolicy is off by default. We only activate the cross-site |
+ // document blocking (for UMA data collection) for normal renderer processes |
+ // running an normal web page. |
+ |
+ const std::string process_type = |
+ command_line->GetSwitchValueASCII(switches::kProcessType); |
+ |
+ // We only turn on SiteIsolationPolicy for a renderer process without having |
+ // the extension flag on. |
+ content::SiteIsolationPolicy::SetPolicyActivationFlag( |
+ process_type == switches::kRendererProcess && |
Charlie Reis
2013/09/03 16:43:23
This check doesn't seem necessary. I think we can
dsjang
2013/09/03 19:13:11
Done.
|
+ !command_line->HasSwitch(switches::kExtensionProcess)); |
} |
void ChromeContentRendererClient::RenderViewCreated( |