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 16ad3a22d66fa5b1d1767958a305407092dec33f..949b6025c60b121e999d7e41551fc05993706c4e 100644 |
| --- a/chrome/browser/content_settings/host_content_settings_map.cc |
| +++ b/chrome/browser/content_settings/host_content_settings_map.cc |
| @@ -231,6 +231,32 @@ ContentSetting HostContentSettingsMap::GetContentSetting( |
| primary_url, secondary_url, content_type, resource_identifier); |
| } |
| +Value* HostContentSettingsMap::GetContentSettingValue( |
| + const GURL& primary_url, |
| + const GURL& secondary_url, |
| + ContentSettingsType content_type, |
| + const std::string& resource_identifier) const { |
| + if (ShouldAllowAllContent(secondary_url, content_type)) |
| + return Value::CreateIntegerValue(CONTENT_SETTING_ALLOW); |
| + |
| + // Iterate through the list of providers and break when the first non NULL |
| + // value is returned. |
| + Value* value = NULL; |
|
wtc
2011/09/01 22:42:34
Nit: move the declaration of |value| inside the fo
markusheintz_
2011/09/02 14:55:59
Done.
|
| + for (ConstProviderIterator provider = content_settings_providers_.begin(); |
| + provider != content_settings_providers_.end(); |
| + ++provider) { |
| + value= (*provider)->GetContentSettingValue( |
|
Pam (message me for reviews)
2011/09/02 11:05:29
Nit: space before =
markusheintz_
2011/09/02 14:55:59
Done.
|
| + primary_url, secondary_url, content_type, resource_identifier); |
| + if (value) |
| + return value; |
| + } |
| + |
| + // TODO(markusheintz): Add a comment. |
|
Pam (message me for reviews)
2011/09/02 11:05:29
Please do todo.
markusheintz_
2011/09/02 14:55:59
Done.
|
| + if (content_type == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE) |
| + return NULL; |
| + return Value::CreateIntegerValue(GetDefaultContentSetting(content_type)); |
|
wtc
2011/09/01 22:42:34
It seems like you have four cases in this function
markusheintz_
2011/09/02 14:55:59
I added some comments. I hope they answer you ques
|
| +} |
| + |
| ContentSetting HostContentSettingsMap::GetContentSettingInternal( |
| const GURL& primary_url, |
| const GURL& secondary_url, |