| Index: components/content_settings/core/browser/host_content_settings_map.h
|
| diff --git a/components/content_settings/core/browser/host_content_settings_map.h b/components/content_settings/core/browser/host_content_settings_map.h
|
| index eadf365cfbd2aeea7914d113f75d79a4d1764d29..63c23d59a8061ae5bb8845bc9ff1f3441a2826c0 100644
|
| --- a/components/content_settings/core/browser/host_content_settings_map.h
|
| +++ b/components/content_settings/core/browser/host_content_settings_map.h
|
| @@ -66,7 +66,8 @@ class HostContentSettingsMap : public content_settings::Observer,
|
| // |is_incognito_profile| and |is_guest_profile| should be true.
|
| HostContentSettingsMap(PrefService* prefs,
|
| bool is_incognito_profile,
|
| - bool is_guest_profile);
|
| + bool is_guest_profile,
|
| + bool store_last_modified);
|
|
|
| static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
|
|
|
| @@ -217,13 +218,17 @@ class HostContentSettingsMap : public content_settings::Observer,
|
| // This should only be called on the UI thread.
|
| void ClearSettingsForOneType(ContentSettingsType content_type);
|
|
|
| + using PatternSourcePredicate =
|
| + base::Callback<bool(const ContentSettingsPattern& primary_pattern,
|
| + const ContentSettingsPattern& secondary_pattern)>;
|
| +
|
| // If |pattern_predicate| is null, this method is equivalent to the above.
|
| - // Otherwise, it only deletes exceptions matched by |pattern_predicate|.
|
| + // Otherwise, it only deletes exceptions matched by |pattern_predicate| that
|
| + // were modified at or after |begin_time|.
|
| void ClearSettingsForOneTypeWithPredicate(
|
| ContentSettingsType content_type,
|
| - const base::Callback<bool(
|
| - const ContentSettingsPattern& primary_pattern,
|
| - const ContentSettingsPattern& secondary_pattern)>& pattern_predicate);
|
| + base::Time begin_time,
|
| + const PatternSourcePredicate& pattern_predicate);
|
|
|
| static bool IsDefaultSettingAllowedForType(ContentSetting setting,
|
| ContentSettingsType content_type);
|
| @@ -358,6 +363,10 @@ class HostContentSettingsMap : public content_settings::Observer,
|
| // Whether this settings map is for an incognito session.
|
| bool is_incognito_;
|
|
|
| + // Whether ContentSettings in the PrefProvider will store a last_modified
|
| + // timestamp.
|
| + bool store_last_modified_;
|
| +
|
| // Content setting providers. This is only modified at construction
|
| // time and by RegisterExtensionService, both of which should happen
|
| // before any other uses of it.
|
|
|