Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: components/content_settings/core/browser/content_settings_pref.h

Issue 2812113004: Write last_modified date to Content Settings in the PrefProvider (Closed)
Patch Set: fix ios Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/content_settings/core/browser/content_settings_pref.h
diff --git a/components/content_settings/core/browser/content_settings_pref.h b/components/content_settings/core/browser/content_settings_pref.h
index 77c6d031fb1c6256122669d3547924a5959a654a..b64ea0e46ec0545e183b836a4f49cc1e6613a8e0 100644
--- a/components/content_settings/core/browser/content_settings_pref.h
+++ b/components/content_settings/core/browser/content_settings_pref.h
@@ -43,6 +43,7 @@ class ContentSettingsPref {
PrefChangeRegistrar* registrar,
const std::string& pref_name,
bool incognito,
+ bool store_last_modified,
NotifyObserversCallback notify_callback);
~ContentSettingsPref();
@@ -56,6 +57,12 @@ class ContentSettingsPref {
const ResourceIdentifier& resource_identifier,
base::Value* value);
+ // Delete a setting if its |last_modified| date is greater or equal to
+ // |begin_time|.
+ void DeleteWebsiteSetting(const ContentSettingsPattern& primary_pattern,
+ const ContentSettingsPattern& secondary_pattern,
+ base::Time begin_time);
raymes 2017/04/24 03:20:22 const base::Time&
+
void ClearPref();
void ClearAllContentSettingsRules();
@@ -77,11 +84,11 @@ class ContentSettingsPref {
// value to the obsolete preference. When calling this function, |lock_|
// should not be held, since this function will send out notifications of
// preference changes.
- void UpdatePref(
- const ContentSettingsPattern& primary_pattern,
- const ContentSettingsPattern& secondary_pattern,
- const ResourceIdentifier& resource_identifier,
- const base::Value* value);
+ void UpdatePref(const ContentSettingsPattern& primary_pattern,
+ const ContentSettingsPattern& secondary_pattern,
+ const ResourceIdentifier& resource_identifier,
+ const base::Time last_modified,
raymes 2017/04/24 03:20:22 const base::Time&
+ const base::Value* value);
static void CanonicalizeContentSettingsExceptions(
base::DictionaryValue* all_settings_dictionary);
@@ -105,6 +112,8 @@ class ContentSettingsPref {
bool is_incognito_;
+ bool store_last_modified_;
+
// Whether we are currently updating preferences, this is used to ignore
// notifications from the preferences service that we triggered ourself.
bool updating_preferences_;

Powered by Google App Engine
This is Rietveld 408576698