| Index: components/content_settings/core/browser/host_content_settings_map.cc
|
| diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc
|
| index 2f2b7cf5d701686c9e73c87f2710954ddf9e18a4..498e80763872ef5c86c9390f056e9c51d3d857ff 100644
|
| --- a/components/content_settings/core/browser/host_content_settings_map.cc
|
| +++ b/components/content_settings/core/browser/host_content_settings_map.cc
|
| @@ -341,7 +341,8 @@ void HostContentSettingsMap::SetNarrowestContentSetting(
|
| type == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING) {
|
| primary_pattern = ContentSettingsPattern::FromURL(primary_url);
|
| secondary_pattern = ContentSettingsPattern::Wildcard();
|
| - } else if (type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC ||
|
| + } else if (type == CONTENT_SETTINGS_TYPE_KEYGEN ||
|
| + type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC ||
|
| type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA ||
|
| type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) {
|
| primary_pattern = ContentSettingsPattern::FromURLNoWildcard(primary_url);
|
| @@ -469,6 +470,21 @@ base::Time HostContentSettingsMap::GetLastUsageByPattern(
|
| primary_pattern, secondary_pattern, content_type);
|
| }
|
|
|
| +void HostContentSettingsMap::SetShouldDisplay(
|
| + const GURL& url,
|
| + ContentSettingsType content_type) {
|
| + if (display_map_.find(url) == display_map_.end())
|
| + display_map_[url] = std::set<ContentSettingsType>();
|
| + display_map_[url].insert(content_type);
|
| +}
|
| +
|
| +bool HostContentSettingsMap::ShouldDisplay(const GURL& url,
|
| + ContentSettingsType content_type) {
|
| + if (display_map_.find(url) != display_map_.end())
|
| + return display_map_[url].count(content_type) != 0;
|
| + return false;
|
| +}
|
| +
|
| void HostContentSettingsMap::AddObserver(content_settings::Observer* observer) {
|
| observers_.AddObserver(observer);
|
| }
|
|
|