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 660cefa0b2c6310f44c59b35c7f44c2062cf5fbe..2b974b94bc15acb64af3ff145b6803ffb33892b6 100644 |
--- a/components/content_settings/core/browser/host_content_settings_map.cc |
+++ b/components/content_settings/core/browser/host_content_settings_map.cc |
@@ -325,12 +325,6 @@ void HostContentSettingsMap::SetContentSetting( |
ContentSetting setting) { |
DCHECK(content_settings::ContentSettingsRegistry::GetInstance()->Get( |
content_type)); |
- if (setting == CONTENT_SETTING_ALLOW && |
- (content_type == CONTENT_SETTINGS_TYPE_GEOLOCATION || |
- content_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS)) { |
- UpdateLastUsageByPattern(primary_pattern, secondary_pattern, content_type); |
- } |
- |
base::Value* value = NULL; |
// A value of CONTENT_SETTING_DEFAULT implies deleting the content setting. |
if (setting != CONTENT_SETTING_DEFAULT) { |
@@ -346,68 +340,6 @@ void HostContentSettingsMap::SetContentSetting( |
value); |
} |
-ContentSetting HostContentSettingsMap::GetContentSettingAndMaybeUpdateLastUsage( |
- const GURL& primary_url, |
- const GURL& secondary_url, |
- ContentSettingsType content_type, |
- const std::string& resource_identifier) { |
- DCHECK(thread_checker_.CalledOnValidThread()); |
- |
- ContentSetting setting = GetContentSetting( |
- primary_url, secondary_url, content_type, resource_identifier); |
- if (setting == CONTENT_SETTING_ALLOW) { |
- UpdateLastUsageByPattern( |
- ContentSettingsPattern::FromURLNoWildcard(primary_url), |
- ContentSettingsPattern::FromURLNoWildcard(secondary_url), |
- content_type); |
- } |
- return setting; |
-} |
- |
-void HostContentSettingsMap::UpdateLastUsage(const GURL& primary_url, |
- const GURL& secondary_url, |
- ContentSettingsType content_type) { |
- UpdateLastUsageByPattern( |
- ContentSettingsPattern::FromURLNoWildcard(primary_url), |
- ContentSettingsPattern::FromURLNoWildcard(secondary_url), |
- content_type); |
-} |
- |
-void HostContentSettingsMap::UpdateLastUsageByPattern( |
- const ContentSettingsPattern& primary_pattern, |
- const ContentSettingsPattern& secondary_pattern, |
- ContentSettingsType content_type) { |
- UsedContentSettingsProviders(); |
- |
- GetPrefProvider()->UpdateLastUsage( |
- primary_pattern, secondary_pattern, content_type); |
- |
- FOR_EACH_OBSERVER( |
- content_settings::Observer, |
- observers_, |
- OnContentSettingUsed(primary_pattern, secondary_pattern, content_type)); |
-} |
- |
-base::Time HostContentSettingsMap::GetLastUsage( |
- const GURL& primary_url, |
- const GURL& secondary_url, |
- ContentSettingsType content_type) { |
- return GetLastUsageByPattern( |
- ContentSettingsPattern::FromURLNoWildcard(primary_url), |
- ContentSettingsPattern::FromURLNoWildcard(secondary_url), |
- content_type); |
-} |
- |
-base::Time HostContentSettingsMap::GetLastUsageByPattern( |
- const ContentSettingsPattern& primary_pattern, |
- const ContentSettingsPattern& secondary_pattern, |
- ContentSettingsType content_type) { |
- UsedContentSettingsProviders(); |
- |
- return GetPrefProvider()->GetLastUsage( |
- primary_pattern, secondary_pattern, content_type); |
-} |
- |
void HostContentSettingsMap::AddObserver(content_settings::Observer* observer) { |
observers_.AddObserver(observer); |
} |