| 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..e211bed861852950843ebae122269b01af891a8f 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,17 @@ class PrefProvider : public ObservableProvider {
|
|
|
| virtual void ShutdownOnUIThread() OVERRIDE;
|
|
|
| + // Records the last time the given pattern has used a certain content setting.
|
| + virtual void UpdateLastUsage(const ContentSettingsPattern& primary_pattern,
|
| + const ContentSettingsPattern& secondary_pattern,
|
| + ContentSettingsType content_type) OVERRIDE;
|
| +
|
| + base::Time GetLastUsage(const ContentSettingsPattern& primary_pattern,
|
| + const ContentSettingsPattern& secondary_pattern,
|
| + ContentSettingsType content_type);
|
| +
|
| + void SetClockForTesting(base::Clock* clock);
|
| +
|
| private:
|
| friend class DeadlockCheckerThread; // For testing.
|
| // Reads all content settings exceptions from the preference and load them
|
| @@ -90,8 +102,14 @@ class PrefProvider : public ObservableProvider {
|
| // Weak; owned by the Profile and reset in ShutdownOnUIThread.
|
| PrefService* prefs_;
|
|
|
| + // Owned, unless set for testing.
|
| + base::Clock* clock_;
|
| +
|
| bool is_incognito_;
|
|
|
| + // Need to know if we made the clock, or if it was passed in for a test.
|
| + bool owns_clock_;
|
| +
|
| PrefChangeRegistrar pref_change_registrar_;
|
|
|
| // Whether we are currently updating preferences, this is used to ignore
|
|
|