| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_POLICY_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // A content settings provider that takes its settings out of policies. | 9 // A content settings provider that takes its settings out of policies. |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 explicit PolicyProvider(PrefService* prefs); | 28 explicit PolicyProvider(PrefService* prefs); |
| 29 virtual ~PolicyProvider(); | 29 virtual ~PolicyProvider(); |
| 30 static void RegisterUserPrefs(PrefService* prefs); | 30 static void RegisterUserPrefs(PrefService* prefs); |
| 31 | 31 |
| 32 // ProviderInterface implementations. | 32 // ProviderInterface implementations. |
| 33 virtual RuleIterator* GetRuleIterator( | 33 virtual RuleIterator* GetRuleIterator( |
| 34 ContentSettingsType content_type, | 34 ContentSettingsType content_type, |
| 35 const ResourceIdentifier& resource_identifier, | 35 const ResourceIdentifier& resource_identifier, |
| 36 bool incognito) const OVERRIDE; | 36 bool incognito) const OVERRIDE; |
| 37 | 37 |
| 38 virtual void SetContentSetting( | 38 virtual bool SetWebsiteSetting( |
| 39 const ContentSettingsPattern& primary_pattern, | 39 const ContentSettingsPattern& primary_pattern, |
| 40 const ContentSettingsPattern& secondary_pattern, | 40 const ContentSettingsPattern& secondary_pattern, |
| 41 ContentSettingsType content_type, | 41 ContentSettingsType content_type, |
| 42 const ResourceIdentifier& resource_identifier, | 42 const ResourceIdentifier& resource_identifier, |
| 43 ContentSetting content_setting) OVERRIDE; | 43 Value* value) OVERRIDE; |
| 44 | 44 |
| 45 virtual void ClearAllContentSettingsRules( | 45 virtual void ClearAllContentSettingsRules( |
| 46 ContentSettingsType content_type) OVERRIDE; | 46 ContentSettingsType content_type) OVERRIDE; |
| 47 | 47 |
| 48 virtual void ShutdownOnUIThread() OVERRIDE; | 48 virtual void ShutdownOnUIThread() OVERRIDE; |
| 49 | 49 |
| 50 // content::NotificationObserver implementation. | 50 // content::NotificationObserver implementation. |
| 51 virtual void Observe(int type, | 51 virtual void Observe(int type, |
| 52 const content::NotificationSource& source, | 52 const content::NotificationSource& source, |
| 53 const content::NotificationDetails& details) OVERRIDE; | 53 const content::NotificationDetails& details) OVERRIDE; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 76 // Used around accesses to the |value_map_| object to guarantee | 76 // Used around accesses to the |value_map_| object to guarantee |
| 77 // thread safety. | 77 // thread safety. |
| 78 mutable base::Lock lock_; | 78 mutable base::Lock lock_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(PolicyProvider); | 80 DISALLOW_COPY_AND_ASSIGN(PolicyProvider); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace content_settings | 83 } // namespace content_settings |
| 84 | 84 |
| 85 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ | 85 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ |
| OLD | NEW |