Chromium Code Reviews| 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..08e347c246e2b4d351aa3abdde611e6cf4ffb8bc 100644 |
| --- a/chrome/renderer/chrome_content_renderer_client.cc |
| +++ b/chrome/renderer/chrome_content_renderer_client.cc |
| @@ -1305,4 +1305,20 @@ bool ChromeContentRendererClient::ShouldReportDetailedMessageForSource( |
| return extensions::IsSourceFromAnExtension(source); |
| } |
| +bool ChromeContentRendererClient::ShouldEnableSiteIsolationPolicy() const { |
| + // SiteIsolationPolicy is off by default. We would like to activate the |
| + // cross-site document blocking (for UMA data collection) for normal renderer |
| + // processes running an normal web page from the Internet. We only turn on |
| + // SiteIsolationPolicy for a renderer process without having the extension |
|
Charlie Reis
2013/09/03 20:22:10
nit: without having -> that does not have
dsjang
2013/09/03 22:31:30
Done.
|
| + // flag on. Currently, this cannot be turned off for resource requests from |
| + // plugins since they request resources via their embedding renderer process. |
| + CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| + 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. |
|
Charlie Reis
2013/09/03 20:22:10
This comment is redundant with the one above.
dsjang
2013/09/03 22:31:30
Done.
|
| + DCHECK(process_type == switches::kRendererProcess); |
|
Charlie Reis
2013/09/03 20:22:10
If this passes the try jobs, then I think we can r
dsjang
2013/09/03 22:31:30
Done.
|
| + return !command_line->HasSwitch(switches::kExtensionProcess); |
| +} |
| + |
| } // namespace chrome |