Index: chrome/browser/chrome_content_browser_client.cc |
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
index 7864eee5cc0e4a5c9a5c83162cdcbfbb33c54161..e65801d6f57e163c03a9594c2bdb6f9ae08f40d8 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -941,10 +941,6 @@ void ChromeContentBrowserClient::RenderProcessHostCreated( |
profile->IsOffTheRecord())); |
SendExtensionWebRequestStatusToHost(host); |
- |
- RendererContentSettingRules rules; |
- GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); |
- host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
} |
GURL ChromeContentBrowserClient::GetEffectiveURL( |
@@ -1276,6 +1272,17 @@ void ChromeContentBrowserClient::SiteInstanceGotProcess( |
const Extension* extension = service->extensions()->GetExtensionOrAppByURL( |
site_instance->GetSiteURL()); |
+ |
+ bool inject_content_rules = !site_instance->GetProcess()->IsGuest() && |
jochen (gone - plz use gerrit)
2013/11/28 22:23:30
from the description, the bug happens in platform
|
+ (!extension || !extension->is_platform_app()); |
Charlie Reis
2013/11/27 17:35:55
This condition is really hard to read. Please pul
jochen (gone - plz use gerrit)
2013/11/28 22:23:30
what happens for other processes that contain a br
|
+ if (inject_content_rules) { |
+ RendererContentSettingRules rules; |
+ GetRendererContentSettingRules( |
+ profile->GetHostContentSettingsMap(), &rules); |
+ site_instance->GetProcess()->Send( |
+ new ChromeViewMsg_SetContentSettingRules(rules)); |
Charlie Reis
2013/11/27 17:35:55
SiteInstanceGotProcess can be called multiple time
|
+ } |
+ |
if (!extension) |
return; |