| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CONFIGURATION_POLICY_STORE_H_ | 5 #ifndef CHROME_BROWSER_CONFIGURATION_POLICY_STORE_H_ |
| 6 #define CHROME_BROWSER_CONFIGURATION_POLICY_STORE_H_ | 6 #define CHROME_BROWSER_CONFIGURATION_POLICY_STORE_H_ |
| 7 | 7 |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 | 9 |
| 10 // An abstract super class for policy stores that provides a method that can be | 10 // An abstract super class for policy stores that provides a method that can be |
| 11 // called by a |ConfigurationPolicyProvider| to specify a policy. | 11 // called by a |ConfigurationPolicyProvider| to specify a policy. |
| 12 class ConfigurationPolicyStore { | 12 class ConfigurationPolicyStore { |
| 13 public: | 13 public: |
| 14 ConfigurationPolicyStore() {} | 14 ConfigurationPolicyStore() {} |
| 15 virtual ~ConfigurationPolicyStore() {} | 15 virtual ~ConfigurationPolicyStore() {} |
| 16 | 16 |
| 17 enum PolicyType { | 17 enum PolicyType { |
| 18 kPolicyHomePage, | 18 kPolicyHomePage, |
| 19 kPolicyHomepageIsNewTabPage, | 19 kPolicyHomepageIsNewTabPage, |
| 20 kPolicyCookiesEnabled | 20 kPolicyCookiesMode |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 // A |ConfigurationPolicyProvider| specifes the value of a policy setting | 23 // A |ConfigurationPolicyProvider| specifes the value of a policy setting |
| 24 // through a call to |Apply|. | 24 // through a call to |Apply|. |
| 25 // The configuration policy pref store takes over the ownership of |value|. | 25 // The configuration policy pref store takes over the ownership of |value|. |
| 26 virtual void Apply(PolicyType policy, Value* value) = 0; | 26 virtual void Apply(PolicyType policy, Value* value) = 0; |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStore); | 29 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStore); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 #endif // CHROME_BROWSER_CONFIGURATION_POLICY_STORE_H_ | 32 #endif // CHROME_BROWSER_CONFIGURATION_POLICY_STORE_H_ |
| 33 | 33 |
| OLD | NEW |