| 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 | 7 |
| 8 // A content settings provider that takes its settings out of policies. | 8 // A content settings provider that takes its settings out of policies. |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const ContentSettingsPattern& secondary_pattern, | 41 const ContentSettingsPattern& secondary_pattern, |
| 42 ContentSettingsType content_type, | 42 ContentSettingsType content_type, |
| 43 const ResourceIdentifier& resource_identifier, | 43 const ResourceIdentifier& resource_identifier, |
| 44 base::Value* value) OVERRIDE; | 44 base::Value* value) OVERRIDE; |
| 45 | 45 |
| 46 virtual void ClearAllContentSettingsRules( | 46 virtual void ClearAllContentSettingsRules( |
| 47 ContentSettingsType content_type) OVERRIDE; | 47 ContentSettingsType content_type) OVERRIDE; |
| 48 | 48 |
| 49 virtual void ShutdownOnUIThread() OVERRIDE; | 49 virtual void ShutdownOnUIThread() OVERRIDE; |
| 50 | 50 |
| 51 virtual std::string GetProviderName() const OVERRIDE; |
| 52 |
| 53 virtual SettingSource GetSettingSource() const OVERRIDE; |
| 54 |
| 51 private: | 55 private: |
| 52 // Reads the policy managed default settings. | 56 // Reads the policy managed default settings. |
| 53 void ReadManagedDefaultSettings(); | 57 void ReadManagedDefaultSettings(); |
| 54 | 58 |
| 55 // Callback for preference changes. | 59 // Callback for preference changes. |
| 56 void OnPreferenceChanged(const std::string& pref_name); | 60 void OnPreferenceChanged(const std::string& pref_name); |
| 57 | 61 |
| 58 // Reads the policy controlled default settings for a specific content type. | 62 // Reads the policy controlled default settings for a specific content type. |
| 59 void UpdateManagedDefaultSetting(ContentSettingsType content_type); | 63 void UpdateManagedDefaultSetting(ContentSettingsType content_type); |
| 60 | 64 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 76 // Used around accesses to the |value_map_| object to guarantee | 80 // Used around accesses to the |value_map_| object to guarantee |
| 77 // thread safety. | 81 // thread safety. |
| 78 mutable base::Lock lock_; | 82 mutable base::Lock lock_; |
| 79 | 83 |
| 80 DISALLOW_COPY_AND_ASSIGN(PolicyProvider); | 84 DISALLOW_COPY_AND_ASSIGN(PolicyProvider); |
| 81 }; | 85 }; |
| 82 | 86 |
| 83 } // namespace content_settings | 87 } // namespace content_settings |
| 84 | 88 |
| 85 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ | 89 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ |
| OLD | NEW |