| 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_POLICY_CONFIGURATION_POLICY_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_ | 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // |Apply| method of |store| to apply specific policies. | 46 // |Apply| method of |store| to apply specific policies. |
| 47 // Returns true if the policy could be provided, otherwise false. | 47 // Returns true if the policy could be provided, otherwise false. |
| 48 virtual bool Provide(ConfigurationPolicyStoreInterface* store) = 0; | 48 virtual bool Provide(ConfigurationPolicyStoreInterface* store) = 0; |
| 49 | 49 |
| 50 // Called by the subclass provider at any time to indicate that the currently | 50 // Called by the subclass provider at any time to indicate that the currently |
| 51 // applied policy is not longer current. A policy refresh will be initiated as | 51 // applied policy is not longer current. A policy refresh will be initiated as |
| 52 // soon as possible. | 52 // soon as possible. |
| 53 virtual void NotifyStoreOfPolicyChange(); | 53 virtual void NotifyStoreOfPolicyChange(); |
| 54 | 54 |
| 55 // Decodes the value tree and writes the configuration to the given |store|. | 55 // Decodes the value tree and writes the configuration to the given |store|. |
| 56 void DecodePolicyValueTree(DictionaryValue* policies, | 56 void DecodePolicyValueTree(const DictionaryValue* policies, |
| 57 ConfigurationPolicyStoreInterface* store); | 57 ConfigurationPolicyStoreInterface* store); |
| 58 protected: | 58 protected: |
| 59 const PolicyDefinitionList* policy_definition_list() const { | 59 const PolicyDefinitionList* policy_definition_list() const { |
| 60 return policy_definition_list_; | 60 return policy_definition_list_; |
| 61 } | 61 } |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // Contains the default mapping from policy values to the actual names. | 64 // Contains the default mapping from policy values to the actual names. |
| 65 const ConfigurationPolicyProvider::PolicyDefinitionList* | 65 const ConfigurationPolicyProvider::PolicyDefinitionList* |
| 66 policy_definition_list_; | 66 policy_definition_list_; |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProvider); | 69 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProvider); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace policy | 72 } // namespace policy |
| 73 | 73 |
| 74 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_ | 74 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_ |
| OLD | NEW |