Index: chrome/browser/content_settings/content_settings_pref_provider.h |
diff --git a/chrome/browser/content_settings/content_settings_pref_provider.h b/chrome/browser/content_settings/content_settings_pref_provider.h |
index 9d8a2bcba85cd040601ca7c616b3483b739f0dbd..08a9d1b9b415f369b84c748894ac4920cd5b8981 100644 |
--- a/chrome/browser/content_settings/content_settings_pref_provider.h |
+++ b/chrome/browser/content_settings/content_settings_pref_provider.h |
@@ -19,6 +19,7 @@ |
class PrefService; |
namespace base { |
+class Clock; |
class DictionaryValue; |
} |
@@ -55,6 +56,18 @@ class PrefProvider : public ObservableProvider { |
virtual void ShutdownOnUIThread() OVERRIDE; |
+ // Records the last time the given pattern has used a certain content setting. |
+ void UpdateLastUsage(const ContentSettingsPattern& primary_pattern, |
+ const ContentSettingsPattern& secondary_pattern, |
+ ContentSettingsType content_type); |
+ |
+ base::Time GetLastUsage(const ContentSettingsPattern& primary_pattern, |
+ const ContentSettingsPattern& secondary_pattern, |
+ ContentSettingsType content_type); |
+ |
+ // Gains ownership of |clock|. |
+ void SetClockForTesting(scoped_ptr<base::Clock> clock); |
+ |
private: |
friend class DeadlockCheckerThread; // For testing. |
// Reads all content settings exceptions from the preference and load them |
@@ -90,6 +103,9 @@ class PrefProvider : public ObservableProvider { |
// Weak; owned by the Profile and reset in ShutdownOnUIThread. |
PrefService* prefs_; |
+ // Can be set for testing. |
+ scoped_ptr<base::Clock> clock_; |
+ |
bool is_incognito_; |
PrefChangeRegistrar pref_change_registrar_; |