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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 78303005: ContentSettings API should not interact with <webview> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplified patch according to comments Created 7 years, 1 month 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: 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;

Powered by Google App Engine
This is Rietveld 408576698