| Index: chrome/browser/content_settings/host_content_settings_map.h
|
| diff --git a/chrome/browser/content_settings/host_content_settings_map.h b/chrome/browser/content_settings/host_content_settings_map.h
|
| index 8d5681a1536a92a9e18978146b253f66554431db..7e2d9c70faafc59dfb820c0ddc5ee09ae9c297a4 100644
|
| --- a/chrome/browser/content_settings/host_content_settings_map.h
|
| +++ b/chrome/browser/content_settings/host_content_settings_map.h
|
| @@ -27,6 +27,7 @@ class GURL;
|
| class PrefService;
|
|
|
| namespace base {
|
| +class Clock;
|
| class Value;
|
| }
|
|
|
| @@ -199,6 +200,28 @@ class HostContentSettingsMap
|
| return is_off_the_record_;
|
| }
|
|
|
| + // Updates the pattern that matches the URLs last time of use.
|
| + //
|
| + // This should only be called on the UI thread.
|
| + void UpdateLastUsage(const GURL& primary_url,
|
| + const GURL& secondary_url,
|
| + ContentSettingsType content_type);
|
| +
|
| + // Returns the last time the pattern that matches the URL has requested
|
| + // permission for the |content_type| setting.
|
| + base::Time GetLastUsage(const GURL& primary_url,
|
| + const GURL& secondary_url,
|
| + ContentSettingsType content_type);
|
| +
|
| + // Returns the last time the pattern has requested permission for the
|
| + // |content_type| setting.
|
| + base::Time GetLastUsageByPattern(
|
| + const ContentSettingsPattern& primary_pattern,
|
| + const ContentSettingsPattern& secondary_pattern,
|
| + ContentSettingsType content_type);
|
| +
|
| + void SetPrefClockForTesting(base::Clock* clock);
|
| +
|
| private:
|
| friend class base::RefCountedThreadSafe<HostContentSettingsMap>;
|
| friend class HostContentSettingsMapTest_NonDefaultSettings_Test;
|
| @@ -236,6 +259,12 @@ class HostContentSettingsMap
|
| // it is not being called too late.
|
| void UsedContentSettingsProviders() const;
|
|
|
| + // Convenience method for updating the last usage of a content type for a
|
| + // pattern.
|
| + void UpdateLastUsageByPattern(const ContentSettingsPattern& primary_pattern,
|
| + const ContentSettingsPattern& secondary_pattern,
|
| + ContentSettingsType content_type);
|
| +
|
| #ifndef NDEBUG
|
| // This starts as the thread ID of the thread that constructs this
|
| // object, and remains until used by a different thread, at which
|
|
|