Chromium Code Reviews| Index: chrome/browser/content_settings/host_content_settings_map.cc |
| diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc |
| index 3b4d4db3938734034237b0864253ffec3cf0a266..fcb1001ee343673b446820ed3ec608143b53caa4 100644 |
| --- a/chrome/browser/content_settings/host_content_settings_map.cc |
| +++ b/chrome/browser/content_settings/host_content_settings_map.cc |
| @@ -184,7 +184,7 @@ base::Value* HostContentSettingsMap::GetContentSettingValue( |
| resource_identifier.empty()); |
| // Check if the scheme of the requesting url is whitelisted. |
| - if (ShouldAllowAllContent(secondary_url, content_type)) |
| + if (ShouldAllowAllContent(primary_url, secondary_url, content_type)) |
| return Value::CreateIntegerValue(CONTENT_SETTING_ALLOW); |
| // The list of |content_settings_providers_| is ordered according to their |
| @@ -405,12 +405,16 @@ void HostContentSettingsMap::AddSettingsForOneType( |
| } |
| bool HostContentSettingsMap::ShouldAllowAllContent( |
| + const GURL& first_party_url, |
|
Bernhard Bauer
2011/11/04 12:12:42
I think we should swap these parameters, no? IIRC
jochen (gone - plz use gerrit)
2011/11/04 12:24:25
I still don't like this primary/secondary naming s
|
| const GURL& url, |
| ContentSettingsType content_type) { |
| if (content_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) |
| return false; |
| + if (url.SchemeIs(chrome::kExtensionScheme)) { |
| + return content_type != CONTENT_SETTINGS_TYPE_COOKIES || |
| + first_party_url.SchemeIs(chrome::kExtensionScheme); |
| + } |
| return url.SchemeIs(chrome::kChromeDevToolsScheme) || |
| url.SchemeIs(chrome::kChromeInternalScheme) || |
| - url.SchemeIs(chrome::kChromeUIScheme) || |
| - url.SchemeIs(chrome::kExtensionScheme); |
| + url.SchemeIs(chrome::kChromeUIScheme); |
| } |