| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PREF_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PREF_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PREF_PROVIDER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PREF_PROVIDER_H_ |
| 7 | 7 |
| 8 // A content settings provider that takes its settings out of the pref service. | 8 // A content settings provider that takes its settings out of the pref service. |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 public: | 35 public: |
| 36 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 36 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 37 | 37 |
| 38 PrefProvider(PrefService* prefs, bool incognito); | 38 PrefProvider(PrefService* prefs, bool incognito); |
| 39 virtual ~PrefProvider(); | 39 virtual ~PrefProvider(); |
| 40 | 40 |
| 41 // ProviderInterface implementations. | 41 // ProviderInterface implementations. |
| 42 virtual RuleIterator* GetRuleIterator( | 42 virtual RuleIterator* GetRuleIterator( |
| 43 ContentSettingsType content_type, | 43 ContentSettingsType content_type, |
| 44 const ResourceIdentifier& resource_identifier, | 44 const ResourceIdentifier& resource_identifier, |
| 45 bool incognito) const OVERRIDE; | 45 bool incognito) const override; |
| 46 | 46 |
| 47 virtual bool SetWebsiteSetting( | 47 virtual bool SetWebsiteSetting( |
| 48 const ContentSettingsPattern& primary_pattern, | 48 const ContentSettingsPattern& primary_pattern, |
| 49 const ContentSettingsPattern& secondary_pattern, | 49 const ContentSettingsPattern& secondary_pattern, |
| 50 ContentSettingsType content_type, | 50 ContentSettingsType content_type, |
| 51 const ResourceIdentifier& resource_identifier, | 51 const ResourceIdentifier& resource_identifier, |
| 52 base::Value* value) OVERRIDE; | 52 base::Value* value) override; |
| 53 | 53 |
| 54 virtual void ClearAllContentSettingsRules( | 54 virtual void ClearAllContentSettingsRules( |
| 55 ContentSettingsType content_type) OVERRIDE; | 55 ContentSettingsType content_type) override; |
| 56 | 56 |
| 57 virtual void ShutdownOnUIThread() OVERRIDE; | 57 virtual void ShutdownOnUIThread() override; |
| 58 | 58 |
| 59 // Records the last time the given pattern has used a certain content setting. | 59 // Records the last time the given pattern has used a certain content setting. |
| 60 void UpdateLastUsage(const ContentSettingsPattern& primary_pattern, | 60 void UpdateLastUsage(const ContentSettingsPattern& primary_pattern, |
| 61 const ContentSettingsPattern& secondary_pattern, | 61 const ContentSettingsPattern& secondary_pattern, |
| 62 ContentSettingsType content_type); | 62 ContentSettingsType content_type); |
| 63 | 63 |
| 64 base::Time GetLastUsage(const ContentSettingsPattern& primary_pattern, | 64 base::Time GetLastUsage(const ContentSettingsPattern& primary_pattern, |
| 65 const ContentSettingsPattern& secondary_pattern, | 65 const ContentSettingsPattern& secondary_pattern, |
| 66 ContentSettingsType content_type); | 66 ContentSettingsType content_type); |
| 67 | 67 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 // Used around accesses to the value map objects to guarantee thread safety. | 121 // Used around accesses to the value map objects to guarantee thread safety. |
| 122 mutable base::Lock lock_; | 122 mutable base::Lock lock_; |
| 123 | 123 |
| 124 DISALLOW_COPY_AND_ASSIGN(PrefProvider); | 124 DISALLOW_COPY_AND_ASSIGN(PrefProvider); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace content_settings | 127 } // namespace content_settings |
| 128 | 128 |
| 129 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PREF_PROVIDER_H_ | 129 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PREF_PROVIDER_H_ |
| OLD | NEW |