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..bed8fd7f84a82c10810ca87e37a4cfc098f900e3 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& url, |
| + const GURL& primary_url, |
| + const GURL& secondary_url, |
| ContentSettingsType content_type) { |
| if (content_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) |
| return false; |
| - return url.SchemeIs(chrome::kChromeDevToolsScheme) || |
| - url.SchemeIs(chrome::kChromeInternalScheme) || |
| - url.SchemeIs(chrome::kChromeUIScheme) || |
| - url.SchemeIs(chrome::kExtensionScheme); |
| + if (secondary_url.SchemeIs(chrome::kExtensionScheme)) { |
| + return content_type != CONTENT_SETTINGS_TYPE_COOKIES || |
| + primary_url.SchemeIs(chrome::kExtensionScheme); |
| + } |
| + return secondary_url.SchemeIs(chrome::kChromeDevToolsScheme) || |
|
Bernhard Bauer
2011/11/04 12:45:51
Do we actually want to look at the secondary URL h
|
| + secondary_url.SchemeIs(chrome::kChromeInternalScheme) || |
| + secondary_url.SchemeIs(chrome::kChromeUIScheme); |
| } |