| 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_FILE_BASED_POLICY_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_FILE_BASED_POLICY_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_POLICY_FILE_BASED_POLICY_PROVIDER_H_ | 6 #define CHROME_BROWSER_POLICY_FILE_BASED_POLICY_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(Delegate); | 58 DISALLOW_COPY_AND_ASSIGN(Delegate); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 // Assumes ownership of |delegate|. | 61 // Assumes ownership of |delegate|. |
| 62 FileBasedPolicyProvider(const PolicyDefinitionList* policy_list, | 62 FileBasedPolicyProvider(const PolicyDefinitionList* policy_list, |
| 63 Delegate* delegate); | 63 Delegate* delegate); |
| 64 virtual ~FileBasedPolicyProvider(); | 64 virtual ~FileBasedPolicyProvider(); |
| 65 | 65 |
| 66 // ConfigurationPolicyProvider implementation. | 66 // ConfigurationPolicyProvider implementation. |
| 67 virtual bool Provide(ConfigurationPolicyStore* store); | 67 virtual bool Provide(ConfigurationPolicyStoreInterface* store); |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 // Decodes the value tree and writes the configuration to the given |store|. | 70 // Decodes the value tree and writes the configuration to the given |store|. |
| 71 void DecodePolicyValueTree(DictionaryValue* policies, | 71 void DecodePolicyValueTree(DictionaryValue* policies, |
| 72 ConfigurationPolicyStore* store); | 72 ConfigurationPolicyStoreInterface* store); |
| 73 | 73 |
| 74 // Watches for changes to the configuration directory. | 74 // Watches for changes to the configuration directory. |
| 75 scoped_refptr<FileBasedPolicyWatcher> watcher_; | 75 scoped_refptr<FileBasedPolicyWatcher> watcher_; |
| 76 | 76 |
| 77 // The loader object we use internally. | 77 // The loader object we use internally. |
| 78 scoped_refptr<FileBasedPolicyLoader> loader_; | 78 scoped_refptr<FileBasedPolicyLoader> loader_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(FileBasedPolicyProvider); | 80 DISALLOW_COPY_AND_ASSIGN(FileBasedPolicyProvider); |
| 81 }; | 81 }; |
| 82 | 82 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 // Wrapped watcher that takes care of the actual watching. | 195 // Wrapped watcher that takes care of the actual watching. |
| 196 FilePathWatcher watcher_; | 196 FilePathWatcher watcher_; |
| 197 | 197 |
| 198 DISALLOW_COPY_AND_ASSIGN(FileBasedPolicyWatcher); | 198 DISALLOW_COPY_AND_ASSIGN(FileBasedPolicyWatcher); |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 } // namespace policy | 201 } // namespace policy |
| 202 | 202 |
| 203 #endif // CHROME_BROWSER_POLICY_FILE_BASED_POLICY_PROVIDER_H_ | 203 #endif // CHROME_BROWSER_POLICY_FILE_BASED_POLICY_PROVIDER_H_ |
| OLD | NEW |